/* ИИ-помощник KRAMENTA: значок и окно чата поверх программы. */
.as-root { position: fixed; inset: 0; pointer-events: none; z-index: 2147483000; }
.as-fab, .as-panel { pointer-events: auto; position: fixed; }
.as-fab {
  width: 52px; height: 52px; border-radius: 50%; border: 0; cursor: grab; touch-action: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent, #0d5c46); color: #fff; box-shadow: 0 4px 14px rgba(0, 0, 0, .22);
}
.as-fab:hover { background: var(--accent-hover, #0a4a38); }
.as-fab:focus-visible { outline: 3px solid #fff; box-shadow: 0 0 0 5px var(--accent, #0d5c46); }
.as-panel {
  width: min(420px, calc(100vw - 16px)); height: min(560px, calc(100vh - 90px));
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line, #d0d4da);
  border-radius: 12px; box-shadow: 0 12px 36px rgba(0, 0, 0, .2); overflow: hidden;
  max-width: calc(100vw - 16px); max-height: calc(100vh - 16px);
}
.as-panel[hidden] { display: none; }
/* Перемещение за шапку и размер за край или угол. */
.as-head { cursor: move; user-select: none; touch-action: none; }
.as-head button { cursor: pointer; }
.as-edge { position: absolute; z-index: 2; touch-action: none; }
.as-edge-n, .as-edge-s { left: 10px; right: 10px; height: 6px; cursor: ns-resize; }
.as-edge-n { top: 0; } .as-edge-s { bottom: 0; }
.as-edge-e, .as-edge-w { top: 10px; bottom: 10px; width: 6px; cursor: ew-resize; }
.as-edge-e { right: 0; } .as-edge-w { left: 0; }
.as-edge-ne, .as-edge-nw, .as-edge-se, .as-edge-sw { width: 12px; height: 12px; }
.as-edge-ne { top: 0; right: 0; cursor: nesw-resize; } .as-edge-sw { bottom: 0; left: 0; cursor: nesw-resize; }
.as-edge-nw { top: 0; left: 0; cursor: nwse-resize; } .as-edge-se { bottom: 0; right: 0; cursor: nwse-resize; }
.as-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap;
  padding: 10px 12px; background: var(--accent, #0d5c46); color: #fff;
}
.as-head-btns { display: flex; align-items: center; gap: 6px; }
.as-head .btn { background: #fff; color: var(--accent, #0d5c46); border-color: #fff; }
.as-x { border: 0; background: transparent; color: #fff; font-size: 22px; line-height: 1; cursor: pointer; padding: 0 4px; }
.as-list { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; background: #f7f9f8; }
.as-msg { max-width: 92%; padding: 8px 10px; border-radius: 10px; font-size: 13.5px; line-height: 1.45; overflow-wrap: anywhere; }
.as-msg p { margin: 0 0 6px; } .as-msg p:last-child { margin-bottom: 0; }
.as-q { align-self: flex-end; background: var(--accent-soft, #e9f2ef); white-space: pre-wrap; }
.as-a { align-self: flex-start; background: #fff; border: 1px solid var(--line, #e1e5e3); }
.as-err { color: #a12a2a; }
.as-src { margin-top: 6px; font-size: 11.5px; color: var(--muted, #69756d); }
.as-empty { color: var(--muted, #69756d); font-size: 13px; line-height: 1.5; }
.as-form { border-top: 1px solid var(--line, #e1e5e3); padding: 8px 10px 10px; }
.as-form textarea { width: 100%; resize: none; box-sizing: border-box; }
.as-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.as-left { font-size: 12px; overflow-wrap: anywhere; }
@media print { .as-root { display: none; } }
/* «Администрирование → Помощник»: таблицы по ширине экрана, длинный текст переносится. */
.asa-table { table-layout: fixed; width: 100%; }
.asa-table th, .asa-table td { white-space: normal; overflow-wrap: anywhere; vertical-align: top; }
