/* Пустые состояния (empty.js): L — .es-hero, M — .es-block, S — .es-row; тона .es-start/.es-done/.es-none/.es-lock.
   Тёмная тема — по умолчанию, светлая — переменными ниже. */
:root{--es-soft:#1e1f24;--es-dash:#34353d;--es-ghost:#2d2e35;--es-card:#1c1d21;--es-card-line:#30313a;--es-glow:#6963c724;--es-tile:#6963c72e;--es-accent:#9c96ee;--es-ink:var(--ink);--es-muted:#9a9aa8;--es-faint:#74747f;--es-done:#7fc4a0;--es-done-bg:#7fc4a01f;--es-lock:#d9b76d;--es-lock-bg:#d9b76d1f;--es-wire:#3e3c5c;--es-shadow:0 8px 24px #0000004d}
:root[data-theme=light]{--es-soft:#f7f7f9;--es-dash:#dcdce4;--es-ghost:#e9e9ef;--es-card:#fff;--es-card-line:#e5e5ea;--es-glow:#f1effb;--es-tile:#eeebf8;--es-accent:#6963c7;--es-muted:#6e6e7b;--es-faint:#9a9aa6;--es-done:#2f7d57;--es-done-bg:#e8f4ee;--es-lock:#976a20;--es-lock-bg:#fbf1e6;--es-wire:#d9d6f0;--es-shadow:0 8px 24px #2020300d}

/* S — строка */
.es-row{display:flex;align-items:center;gap:10px;min-height:40px;padding:8px 12px;border-radius:6px;background:var(--es-soft);font-size:13px;line-height:1.45;color:var(--es-muted)}
.es-row>svg{flex:none;color:var(--es-faint)}
.es-row.es-done>svg{color:var(--es-done)}
.es-row.es-lock>svg{color:var(--es-lock)}
.es-row-action{margin-left:auto;flex:none}
.es-row-action .text-btn,.es-row-action a{font-size:13px;font-weight:500;color:var(--es-accent);text-decoration:none}
.panel>.es-row,.panel.pad>.es-row{margin:0}
.panel:has(>.es-row:only-child),.panel:has(>.es-block:only-child),.panel:has(>.es-hero:only-child){border:0;background:none;box-shadow:none;padding:0}

/* M — блок */
.es-block{display:flex;gap:14px;align-items:flex-start;padding:18px;border:1px dashed var(--es-dash);border-radius:8px;text-align:left}
.es-block>div{display:flex;flex-direction:column;gap:4px;min-width:0}
.es-block b{font-size:14px;font-weight:600;color:var(--es-ink);line-height:1.4}
.es-block p{margin:0;font-size:13px;line-height:1.55;color:var(--es-muted)}
.es-block .es-actions{display:flex;flex-wrap:wrap;align-items:center;gap:6px 16px;margin-top:10px}
.es-tile{width:32px;height:32px;border-radius:8px;flex:none;display:grid;place-items:center;background:var(--es-tile);color:var(--es-accent)}
.es-done .es-tile{background:var(--es-done-bg);color:var(--es-done)}
.es-lock .es-tile{background:var(--es-lock-bg);color:var(--es-lock)}
.es-none .es-tile{background:var(--es-soft);color:var(--es-muted)}

/* L — экран */
.es-hero{position:relative;display:flex;flex-direction:column;align-items:center;text-align:center;padding:56px 24px 52px;border-radius:12px;background:radial-gradient(60% 70% at 50% 18%,var(--es-glow) 0%,transparent 70%)}
.es-hero.es-compact{padding:40px 20px 36px}
.es-hero h2{margin:0;font-size:20px;font-weight:600;letter-spacing:-.4px;color:var(--es-ink);line-height:1.35}
.es-hero.es-compact h2{font-size:17px;letter-spacing:-.3px}
.es-hero p{margin:10px 0 0;max-width:460px;font-size:14px;line-height:1.6;color:var(--es-muted)}
.es-hero .es-actions{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;margin-top:24px}
.es-hero .es-foot{margin-top:16px;font-size:13px;color:var(--es-muted)}
.es-hero .es-foot .text-btn{font-size:13px;font-weight:500;color:var(--es-accent)}
.es-actions .btn{min-height:34px}

/* Силуэты */
.es-bar{display:block;height:6px;border-radius:3px;background:var(--es-ghost)}
.es-mark{display:block}
.es-dot{width:8px;height:8px;border-radius:50%;flex:none;background:var(--es-accent)}
.es-dot-done{background:var(--es-done)}
.es-dot-lock{background:var(--es-lock)}

/* Сцена «знания спейса»: источники → мозг → карточки */
.es-scene{position:relative;width:420px;max-width:100%;height:170px;margin-bottom:30px}
.es-scene-sources{position:absolute;left:0;top:18px;display:flex;flex-direction:column;gap:12px;align-items:flex-start}
.es-chip{display:inline-flex;align-items:center;gap:7px;height:28px;padding:0 10px;border:1px solid var(--es-card-line);border-radius:14px;background:var(--es-card);font-size:12px;color:var(--es-muted)}
.es-chip svg{color:var(--es-faint)}
.es-scene-wires{position:absolute;inset:0}
.es-scene-wires path{stroke:var(--es-wire);stroke-width:1.5;stroke-dasharray:3 4;animation:es-flow 1.6s linear infinite}
.es-scene-brain{position:absolute;left:186px;top:61px;width:48px;height:48px;border-radius:12px;background:#1a1830;display:grid;place-items:center;box-shadow:0 10px 30px #6963c740,0 0 0 6px #6963c714}
.es-scene-cards{position:absolute;left:266px;top:30px;width:154px;display:flex;flex-direction:column;gap:8px}
.es-card{display:flex;flex-direction:column;gap:6px;padding:9px 10px;border:1px solid var(--es-card-line);border-radius:8px;background:var(--es-card);text-align:left}
.es-card b{font-size:10px;font-weight:600;letter-spacing:.4px;text-transform:uppercase;line-height:1.2}
.es-card-decision{box-shadow:var(--es-shadow)}
.es-card-decision b{color:var(--es-accent)}
.es-card-risk{opacity:.8}.es-card-risk b{color:var(--es-lock)}
.es-card-commit{opacity:.55}.es-card-commit b{color:var(--es-done)}
@keyframes es-flow{to{stroke-dashoffset:-14}}

/* Стопка карточек */
.es-stack{position:relative;width:168px;height:92px;margin-bottom:26px}
.es-stack-back{position:absolute;left:14px;top:18px;width:140px;height:64px;border:1px solid var(--es-card-line);border-radius:8px;background:var(--es-soft);transform:rotate(-5deg)}
.es-stack-front{position:absolute;left:14px;top:10px;width:140px;height:68px;box-sizing:border-box;padding:14px;display:flex;flex-direction:column;gap:8px;border:1px solid var(--es-card-line);border-radius:8px;background:var(--es-card);box-shadow:var(--es-shadow)}
.es-stack-head{display:flex;align-items:center;gap:6px}
.es-stack-mark{position:absolute;right:-2px;top:-8px;width:34px;height:34px;border-radius:9px;background:#1a1830;display:grid;place-items:center}

/* Кольца: всё разобрано / нет доступа / тишина */
.es-rings{position:relative;width:96px;height:96px;margin-bottom:24px;display:grid;place-items:center}
.es-rings span{position:absolute;inset:0;border:1px solid var(--es-card-line);border-radius:50%}
.es-rings span+span{inset:16px;border-color:var(--es-dash);background:var(--es-card)}
.es-rings b{position:relative;width:40px;height:40px;border-radius:12px;display:grid;place-items:center;background:var(--es-tile);color:var(--es-accent)}
.es-rings-done b{background:var(--es-done-bg);color:var(--es-done)}
.es-rings-lock b{background:var(--es-lock-bg);color:var(--es-lock)}

/* Старые одиночные строки .empty, которые ещё не переведены на helpers, — в той же манере */
.empty:not(.es-row):not(.inbox-empty){display:flex;align-items:center;gap:10px;min-height:40px;margin:0;padding:8px 12px;border-radius:6px;background:var(--es-soft);font-size:13px;color:var(--es-muted)}

@media (max-width:640px){.es-hero{padding:40px 12px 36px}.es-scene{transform:scale(.78);transform-origin:top center;margin-bottom:0;height:150px}.es-row{flex-wrap:wrap}.es-row-action{margin-left:25px}}
@media (prefers-reduced-motion:reduce){.es-scene-wires path{animation:none}}
/* Пустой список диалогов агента — в узкой колонке, по центру */
.agent-thread-empty.es-threads{display:flex;flex-direction:column;align-items:center;gap:10px;padding:28px 12px;text-align:center;color:var(--es-muted);font-size:13px}
.es-threads svg{width:34px;height:34px;padding:9px;border-radius:9px;background:var(--es-soft);color:var(--es-faint);box-sizing:border-box}
.es-goal .es-card{gap:7px}.es-goal-bars{display:flex;flex-direction:column;gap:5px;margin:2px 0 3px}.es-goal-bars .es-bar{width:132px;position:relative;overflow:hidden}.es-goal-time::after,.es-goal-ready::after{content:"";position:absolute;inset:0 auto 0 0;border-radius:3px}.es-goal-time::after{width:62%;background:var(--es-faint);opacity:.55}.es-goal-ready::after{width:38%;background:var(--es-accent)}.es-goal-crit{display:flex;align-items:center;gap:6px}.es-goal-crit .es-dot{width:7px;height:7px;background:var(--es-ghost)}.es-goal-crit .es-dot.es-dot-done{background:var(--es-done)}
