/* Оформление менеджера по макету «Вариант 2»: три колонки, карточки, шапка материала. */
:root{
  --m-bg:#f6f7f9;--m-line:#e5e8ee;--m-line-soft:#eef0f4;--m-ink:#1d2433;--m-text:#39445a;--m-muted:#7b8798;
  --m-blue:#2f56d9;--m-blue-soft:#eef2ff;--m-green:#1f7a43;--m-green-soft:#e7f6ec;--m-amber:#96660f;--m-amber-soft:#fdf3e2;
}
/* ---------- Левая колонка ---------- */
.editor-nav{background:#fff;border-right:1px solid var(--m-line);padding:20px 14px 16px;gap:0}
.editor-brand{align-items:center;gap:10px;margin:0 6px 26px}
.editor-brand>b{background:var(--m-blue);border-radius:9px;padding:9px 7px;font-size:13px;letter-spacing:.02em;font-weight:700}
.editor-brand>span{font-size:13px;font-weight:650;line-height:1.35;color:var(--m-ink)}
.editor-brand small{display:block;margin-top:2px;color:var(--m-muted);font-size:11px;font-weight:400}
.editor-nav-section{font-size:10px;letter-spacing:.09em;text-transform:uppercase;color:#98a2b3;margin:0 8px 10px;font-weight:600}
.editor-nav-links{display:grid;gap:2px}
.editor-nav-links button{display:flex;align-items:center;gap:10px;white-space:nowrap;border:0;background:transparent;color:#3d4a60;border-radius:8px;min-height:38px;padding:8px 10px;font-size:13.5px;font-weight:500;text-align:left}
.editor-nav-links button svg{width:17px;height:17px;flex:0 0 17px;stroke:#818d9f}
.editor-nav-links button:hover{background:#f4f6fa}
.editor-nav-links button[aria-current=page]{background:var(--m-blue-soft);color:var(--m-blue);font-weight:650}
.editor-nav-links button[aria-current=page] svg{stroke:var(--m-blue)}
.editor-nav-note{margin-top:auto;padding:14px 8px 12px;font-size:11px;line-height:1.5;color:#98a2b3;border-top:1px solid var(--m-line-soft)}
.editor-nav-account{margin:0;border-top:1px solid var(--m-line);padding:12px 6px 0;display:grid;gap:6px}
.editor-nav-account #user-display{font-size:13px;font-weight:650;color:var(--m-ink)}
.editor-nav-account #role-badge{font-size:11px;color:var(--m-muted);background:none;padding:0;border:0}
.editor-nav-account .notify-switch{font-size:11px;color:var(--m-muted)}
.editor-nav-account #logout-btn{min-height:34px;font-size:12.5px;border:1px solid var(--m-line);background:#fff;color:#4a5568;border-radius:8px}
.editor-user{display:flex;align-items:center;gap:9px;margin-bottom:2px}
.editor-avatar{width:32px;height:32px;border-radius:50%;background:var(--m-blue-soft);color:var(--m-blue);display:grid;place-items:center;font-size:11px;font-weight:700;flex:0 0 32px}
.editor-user-meta{display:grid;min-width:0}
/* ---------- Средняя колонка ---------- */
.editor-queue{background:#fff;border-right:1px solid var(--m-line);padding:20px 14px 0}
.editor-queue-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 2px 16px}
.editor-queue>h2,.editor-queue-head>h2{font-size:19px;line-height:1.2;margin:0;color:var(--m-ink);font-weight:700}
.editor-queue-create{flex:0 0 auto;width:32px;height:32px;min-height:32px;padding:0;border:1px solid var(--m-line);border-radius:9px;background:#fff;color:var(--m-blue);display:grid;place-items:center;box-shadow:0 1px 2px #1d243310}
.editor-queue-create svg{width:16px;height:16px}
.editor-queue-create:hover{background:var(--m-blue-soft);border-color:#c9d4f7}
.editor-queue .task-search-bar{margin:0 0 10px;padding:0;background:none;border:0}
.editor-queue .task-search-bar label{display:none}
.editor-queue .task-search-controls{position:relative}
.editor-queue #task-search{height:38px;padding:8px 12px 8px 34px;font-size:13.5px;border:1px solid var(--m-line);border-radius:9px;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23818d9f' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 11px center;background-size:15px}
.editor-queue #task-search::placeholder{color:#98a2b3}
.editor-queue #task-search-clear{position:absolute;right:4px;top:4px;min-height:30px;font-size:11.5px;border:0;background:#f1f3f7;border-radius:7px;color:#5a6472;padding:0 8px}
.queue-filters{display:flex;gap:6px;align-items:center;margin:0 0 18px;flex-wrap:nowrap}
.queue-chip,.queue-select{height:30px;min-height:30px;font-size:12.5px;border-radius:8px;border:1px solid var(--m-line);background:#fff;color:#48536b;padding:0 8px;min-width:0;flex:1 1 0;text-overflow:ellipsis}
.queue-chip{flex:0 0 auto;padding:0 12px}
.queue-chip{cursor:pointer}
.queue-chip.is-active{background:var(--m-blue-soft);border-color:#c9d4f7;color:var(--m-blue);font-weight:600}
.queue-select{appearance:none;padding-right:22px;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23818d9f' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 8px center;background-size:12px}
.queue-section-label{font-size:10px;letter-spacing:.09em;text-transform:uppercase;color:#98a2b3;font-weight:600;margin:0 2px 10px}
.editor-queue #tasks-list{display:grid;gap:8px}
.editor-task{position:relative;width:100%;text-align:left;border:1px solid var(--m-line);border-radius:11px;background:#fff;padding:12px 13px;display:flex;flex-direction:row;gap:10px;color:var(--m-ink);min-height:0;box-shadow:none;align-items:flex-start}
.editor-task:hover{border-color:#cfd8ea;background:#fcfdff}
.editor-task.selected{border-color:#b9c8f5;background:#fbfcff;box-shadow:0 1px 3px #2f56d914}
.editor-task-main{display:grid;gap:5px;min-width:0;flex:1}
.editor-task-meta{font-size:11px;color:#98a2b3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.editor-task strong{font-size:13.5px;line-height:1.45;font-weight:600;color:var(--m-ink);overflow-wrap:anywhere;display:block}
.editor-task-status{display:inline-flex;align-items:center;gap:5px;font-size:11px;font-weight:600;padding:3px 8px;border-radius:999px;width:max-content;max-width:100%}
.editor-task-status::before{content:"";width:5px;height:5px;border-radius:50%;background:currentColor;flex:0 0 5px}
.editor-task-status--completed{background:var(--m-green-soft);color:var(--m-green)}
.editor-task-status--pending{background:var(--m-amber-soft);color:var(--m-amber)}
.editor-task-status--in_progress{background:var(--m-blue-soft);color:var(--m-blue)}
.editor-task-side{display:grid;gap:4px;justify-items:end;flex:0 0 auto;font-size:10.5px;color:#98a2b3;text-align:right}
.editor-task-langs{display:flex;gap:3px}
.editor-task-langs i{font-style:normal;font-size:9.5px;font-weight:700;letter-spacing:.03em;color:#6b7787;background:#f1f3f7;border-radius:4px;padding:1px 3px}
.editor-task-picked{position:absolute;right:12px;bottom:9px;font-size:10.5px;color:#98a2b3}
.queue-note{margin:16px 2px 18px;font-size:11px;line-height:1.55;color:#a2acb9;border-top:1px solid var(--m-line-soft);padding-top:14px}
.editor-queue .pagination-container{margin:14px 0 0;padding:10px 0 0;border-top:1px solid var(--m-line-soft)}
/* ---------- Правая колонка: шапка материала ---------- */
.editor-toolbar{min-height:44px;border-bottom:1px solid var(--m-line);padding:6px 26px;font-size:12px;color:var(--m-muted);gap:14px;background:#fff}
.editor-crumbs{display:flex;align-items:center;gap:6px;min-width:0;font-size:12px;color:var(--m-muted)}
.editor-crumbs svg{width:12px;height:12px;stroke:#b3bccb;flex:0 0 12px}
.editor-crumbs b{color:var(--m-ink);font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.editor-toolbar-right{display:flex;align-items:center;gap:12px;margin-left:auto}
.editor-fresh{display:inline-flex;align-items:center;gap:6px;font-size:12px;color:#8b96a5;white-space:nowrap}
.editor-fresh i{width:6px;height:6px;border-radius:50%;background:#38a169;flex:0 0 6px}
.editor-toolbar [data-editor-refresh]{min-height:32px;padding:5px 10px;font-size:12px;border:1px solid var(--m-line);border-radius:8px;background:#fff;color:#48536b}
.editor-heading{padding:22px 26px 6px}
.editor-heading>p:first-child{font-size:11px;letter-spacing:.07em;text-transform:uppercase;color:#98a2b3;font-weight:600;margin:0 0 8px}
.editor-heading h1{font-size:25px;line-height:1.28;font-weight:700;letter-spacing:-.01em;color:var(--m-ink);margin:0 0 10px;max-height:96px;overflow:hidden}
.editor-heading-meta{margin:0;font-size:12.5px;color:var(--m-muted)}
.editor-heading-meta:empty{display:none}
.editor-expand-title{margin:-4px 0 8px;min-height:30px;padding:4px 10px;font-size:11.5px;border:1px solid var(--m-line);border-radius:8px;background:#fff;color:#4a5568;width:max-content}
/* Плашка бота */
.editor-task-bot{margin:14px 26px 8px;padding:13px 15px;border:1px solid var(--m-line);border-radius:12px;background:#fff;display:flex;align-items:center;gap:13px}
.editor-bot-icon{width:38px;height:38px;border-radius:10px;background:#f2f5ff;color:var(--m-blue);display:grid;place-items:center;flex:0 0 38px}
.editor-bot-icon svg{width:20px;height:20px}
.editor-bot-body{display:grid;gap:3px;min-width:0;flex:1}
.editor-bot-title{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.editor-bot-title b{font-size:13px;font-weight:650;color:var(--m-ink)}
.editor-bot-badge{font-size:10.5px;font-weight:650;padding:2px 8px;border-radius:999px;background:var(--m-green-soft);color:var(--m-green)}
.editor-bot-badge[data-state=processing],.editor-bot-badge[data-state=requested]{background:var(--m-blue-soft);color:var(--m-blue)}
.editor-bot-badge[data-state=failed],.editor-bot-badge[data-state=stale]{background:var(--m-amber-soft);color:var(--m-amber)}
.editor-bot-badge[data-state=unavailable]{background:#f1f3f7;color:#6b7787}
.editor-task-bot-text{font-size:12.5px;color:#5c6879;line-height:1.45}
.editor-bot-details{margin-top:2px}
.editor-bot-details>summary{font-size:11.5px;color:#98a2b3;cursor:pointer;list-style:none;display:inline-flex;align-items:center;gap:4px}
.editor-bot-details>summary::-webkit-details-marker{display:none}
.editor-bot-details>summary::before{content:"▸";font-size:9px;color:#b3bccb}
.editor-bot-details[open]>summary::before{content:"▾"}
.editor-bot-diagnostics{white-space:pre-wrap;font-size:12px;color:#5c6879;margin:8px 0 6px;overflow-wrap:anywhere}
.editor-bot-details button{min-height:32px;padding:5px 10px;font-size:12px;border:1px solid var(--m-line);border-radius:8px;background:#fff;color:#48536b}
.editor-task-bot-actions{margin:0;flex:0 0 auto}
.editor-task-bot-actions button{min-height:34px;padding:6px 12px;font-size:12.5px;border:1px solid var(--m-line);border-radius:9px;background:#fff;color:#39445a;white-space:nowrap}
.editor-task-bot-actions button:hover{background:#f6f8fc}
/* Вкладки */
.editor-tabs{gap:26px;padding:6px 26px 0;border-bottom:1px solid var(--m-line);margin-top:6px}
.editor-tabs button{font-size:13.5px;padding:12px 0;min-height:44px;color:#6f7b8c;display:inline-flex;align-items:center;gap:6px;border-bottom:2px solid transparent}
.editor-tabs button[aria-selected=true]{color:var(--m-blue);border-bottom-color:var(--m-blue);font-weight:650}
.editor-tab-count{font-size:10.5px;font-weight:600;background:#f1f3f7;color:#6b7787;border-radius:5px;padding:1px 5px;min-width:16px;text-align:center}
.editor-tabs button[aria-selected=true] .editor-tab-count{background:var(--m-blue-soft);color:var(--m-blue)}
.editor-panels{padding:20px 26px 34px}
/* Нижняя панель сохранения */
.editor-save-bar{display:flex;align-items:center;justify-content:space-between;gap:14px;border-top:1px solid var(--m-line);background:#fff;padding:11px 26px;flex-shrink:0}
.editor-save-state{display:inline-flex;align-items:center;gap:8px;font-size:12.5px;color:#96660f}
.editor-save-state i{width:7px;height:7px;border-radius:50%;background:#e0a83c;flex:0 0 7px}
.editor-save-actions{display:flex;gap:9px}
.editor-save-actions button{min-height:38px;padding:8px 16px;font-size:13px;border-radius:9px;border:1px solid var(--m-line);background:#fff;color:#39445a}
.editor-save-actions .editor-save-primary{background:var(--m-blue);border-color:var(--m-blue);color:#fff;font-weight:600}
.editor-save-actions .editor-save-primary:disabled{background:#b9c4dd;border-color:#b9c4dd}
@media(max-width:1100px) and (min-width:761px){
  .editor-heading h1{font-size:21px}
  .editor-toolbar,.editor-heading,.editor-panels,.editor-tabs,.editor-save-bar{padding-left:18px;padding-right:18px}
  .editor-task-bot{margin-left:18px;margin-right:18px}
}
@media(max-width:760px){
  .editor-nav{padding:8px 10px;border-bottom:1px solid var(--m-line);flex-direction:row;flex-wrap:nowrap;height:56px;max-height:56px;align-items:center;overflow:visible;gap:8px}
  .editor-nav-links{display:flex;flex-direction:row;flex-wrap:nowrap;gap:4px;overflow-x:auto;min-width:0}
  .editor-brand{margin:0 10px 0 0}
  .editor-nav-section,.editor-nav-note{display:none}
  .editor-queue{padding:14px 12px 0}
  .editor-queue>h2,.editor-queue-head>h2{font-size:18px}
  .editor-queue-create{width:36px;height:36px;min-height:36px}
  .editor-task{padding:11px 12px}
  .editor-task strong{font-size:13.5px}
  .editor-task-side{font-size:10px}
  .editor-toolbar{padding:6px 14px}
  .editor-fresh{display:none}
  .editor-heading{padding:16px 16px 6px}
  .editor-heading h1{font-size:19px}
  .editor-task-bot{margin:12px 14px 4px;padding:11px;gap:10px;align-items:flex-start;flex-wrap:wrap}
  .editor-task-bot-actions{width:100%;margin:0}
  .editor-task-bot-actions button{width:100%}
  .editor-tabs{padding:4px 16px 0;gap:20px}
  .editor-panels{padding:16px}
  .editor-save-bar{padding:10px 14px;flex-wrap:wrap;gap:10px}
  .editor-save-actions{width:100%}
  .editor-save-actions button{flex:1}
}

/* Блок соцтекстов: карточка с языковыми вкладками и подсказкой справа */
.editor-social-card{border:1px solid var(--m-line);border-radius:12px;background:#fff;overflow:hidden;margin:0 0 14px}
.editor-language-tabs{display:flex;gap:6px;padding:10px 12px;border-bottom:1px solid var(--m-line-soft);flex-wrap:wrap;align-items:center}
.editor-language-tabs button{min-height:30px;padding:5px 11px;font-size:12.5px;border:1px solid transparent;border-radius:8px;background:#fff;color:#5c6879}
.editor-language-tabs button[aria-pressed=true]{border-color:#c9d4f7;background:var(--m-blue-soft);color:var(--m-blue);font-weight:600}
.editor-social-card pre,.editor-social-view{border:0;background:#fff;margin:0;padding:14px 16px;max-height:320px;overflow:auto;font:14px/1.65 'Inter','Segoe UI',Arial,sans-serif;white-space:pre-wrap;overflow-wrap:anywhere}
.editor-social-copy{display:flex;gap:9px;flex-wrap:wrap;align-items:center;margin:0 0 12px;padding:10px 12px;border-top:1px solid var(--m-line-soft);background:#fff}
.editor-social-copy button{min-height:34px;padding:6px 12px;font-size:12.5px;border:1px solid var(--m-line);border-radius:8px;background:#fff;color:#39445a}
.editor-social-copy::after{content:"Текст можно изменить";margin-left:auto;font-size:11.5px;color:#a2acb9}
.editor-note-details{margin:10px 0 0}
.editor-note-details>summary{font-size:12px;color:#7b8798;cursor:pointer;list-style:none;display:inline-flex;align-items:center;gap:5px}
.editor-note-details>summary::-webkit-details-marker{display:none}
.editor-note-details>summary::before{content:"▸";font-size:9px;color:#b3bccb}
.editor-note-details[open]>summary::before{content:"▾"}
.editor-section-heading h2{font-size:16px;font-weight:650}
.editor-language{font-size:12px;color:var(--m-muted)}
.editor-language select{min-height:32px;font-size:12.5px;border:1px solid var(--m-line);border-radius:8px}
.editor-help{font-size:12.5px;color:#8b96a5;max-width:82ch}

/* Вспомогательные действия панели «Исходник» — второй строкой, отдельной рамкой */
.editor-source-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:0 0 4px}
.editor-source-head h2{margin:0}
.editor-source-extra{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.editor-panels .btn-edit,.editor-source-extra .btn-edit{min-height:38px;padding:8px 14px;font-size:13px;line-height:1.2;border:1px solid var(--m-line);border-radius:9px;background:#fff;color:#39445a;display:inline-flex;align-items:center;justify-content:center;white-space:nowrap;box-shadow:none}
.editor-panels .btn-edit:hover,.editor-source-extra .btn-edit:hover{background:#f6f8fc;border-color:#cfd8ea}
.editor-panel{padding-bottom:8px}
.editor-panel form>button[type=submit]{min-height:40px;padding:9px 16px;font-size:13.5px;border-radius:9px;border:1px solid var(--m-blue);background:var(--m-blue);color:#fff;font-weight:600}
.editor-panel form>button[type=submit]:disabled{background:#b9c4dd;border-color:#b9c4dd}
