/* Ask Drawer v1.0：每頁右下角的 AI 對話入口與右側對話面板（樣式比照「建立 Agent 團隊」面板） */
.atask { --ak-accent: var(--accent, #5b5bd6); --ak-tint: var(--accent-tint, #f1f1fd); position: fixed; top: 24px; right: 24px; bottom: 24px; width: min(560px, calc(100vw - 48px)); z-index: 2050; display: none; flex-direction: column; background: #fff; border: 1px solid #ececf1; border-radius: 18px; box-shadow: 0 24px 64px rgba(24, 24, 40, .22); overflow: hidden; color: var(--text-primary, #18181b); font-size: 14px; }
.atask.is-open { display: flex; }
.atask__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 20px 14px; border-bottom: 1px solid #f0f0f3; }
.atask__title { font-size: 18px; font-weight: 700; }
.atask__sub { margin-top: 4px; font-size: 13px; color: var(--text-muted, #71717a); }
.atask__x { border: 0; background: none; font-size: 26px; line-height: 1; color: var(--text-muted, #71717a); cursor: pointer; width: 34px; height: 34px; border-radius: 8px; }
.atask__x:hover { background: #f4f4f5; }
.atask__body { flex: 1; overflow-y: auto; padding: 16px 20px; display: flex; flex-direction: column; gap: 12px; }
.atask__intro { border: 1px solid rgba(91, 91, 214, .22); background: var(--ak-tint); border-radius: 14px; padding: 14px 16px; }
.atask__intro b { font-size: 15px; }
.atask__intro p { margin: 6px 0 10px; font-size: 13.5px; line-height: 1.7; color: var(--text-secondary, #52525b); }
.atask__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.atask__chip { border: 1px solid rgba(91, 91, 214, .3); background: #fff; color: var(--ak-accent); border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 13px; cursor: pointer; text-align: left; }
.atask__chip:hover { border-color: var(--ak-accent); }
.atask__msg { max-width: 92%; padding: 10px 14px; border-radius: 14px; line-height: 1.7; word-break: break-word; font-size: 14px; }
.atask__msg--user { align-self: flex-end; background: var(--ak-accent); color: #fff; border-bottom-right-radius: 4px; }
.atask__msg--ai { align-self: flex-start; background: #f6f6f8; border-bottom-left-radius: 4px; }
.atask__msg pre { white-space: pre-wrap; background: #fff; border: 1px solid #ececf1; border-radius: 8px; padding: 8px 10px; font-size: 12.5px; margin: 6px 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.atask__msg code { background: rgba(0, 0, 0, .06); border-radius: 4px; padding: 0 4px; font-size: 12.5px; }
.atask__msg a { color: var(--ak-accent); }
.atask__msg--user a { color: #fff; }
.atask__tool { font-size: 12.5px; color: var(--text-muted, #71717a); margin-bottom: 4px; }
.atask__dots { color: var(--text-muted, #71717a); }
.atask__dots::after { content: '…'; animation: akdots 1.2s steps(3) infinite; display: inline-block; overflow: hidden; vertical-align: bottom; width: 1em; }
@keyframes akdots { 0% { width: 0 } 100% { width: 1em } }
.atask__appr { margin-top: 8px; border: 1px solid #f3d9a4; background: #fff8ea; border-radius: 10px; padding: 10px 12px; }
.atask__appr p { margin: 4px 0 8px; font-size: 13px; }
.atask__abtn { border: 1px solid rgba(91, 91, 214, .35); background: #fff; color: var(--ak-accent); border-radius: 8px; padding: 5px 10px; margin: 0 6px 6px 0; font: inherit; font-size: 13px; cursor: pointer; }
.atask__abtn.is-deny { color: #b42318; border-color: #f1b5ae; }
.atask__err { margin-top: 6px; color: #b42318; font-size: 13px; }
.atask__foot { border-top: 1px solid #f0f0f3; padding: 12px 16px 14px; }
.atask__input { width: 100%; box-sizing: border-box; resize: none; border: 1.5px solid var(--ak-accent); border-radius: 12px; padding: 10px 12px; font: inherit; font-size: 14px; line-height: 1.6; outline: none; }
.atask__input:focus { box-shadow: 0 0 0 3px rgba(91, 91, 214, .14); }
.atask__actions { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.atask__sp { flex: 1; }
.atask__send { border: 0; border-radius: 10px; background: var(--ak-accent); color: #fff; font: inherit; font-size: 14px; font-weight: 600; padding: 8px 18px; cursor: pointer; }
.atask__send:disabled { opacity: .5; cursor: default; }
.atask__link { border: 0; background: none; font: inherit; font-size: 13.5px; color: var(--ak-accent); cursor: pointer; padding: 4px 2px; }
.atask__link:hover { text-decoration: underline; }
@media (max-width: 720px) { .atask { top: 8px; right: 8px; bottom: 8px; width: calc(100vw - 16px); } }
.atask-fab { position: fixed; right: 24px; bottom: 24px; z-index: 2040; border: 0; border-radius: 999px; background: var(--accent, #5b5bd6); color: #fff; font: inherit; font-size: 15px; font-weight: 600; padding: 12px 20px; box-shadow: 0 8px 24px rgba(91, 91, 214, .35); cursor: pointer; white-space: nowrap; }
.atask-fab:hover { filter: brightness(.95); }
.atask-fab.is-hidden { display: none; }
.atask__chip--wiz { background: var(--ak-tint) !important; font-weight: 600; }
/* 原本右下角的「建立 Agent 團隊」浮動鈕收起（改由組織圖、Agents 頁的對話面板打開精靈）；工具庫頁首的舊按鈕也收起 */
[class*="_fab_"] { display: none !important; }
.tbv-head .tbv-ask { display: none !important; }
@media (max-width: 720px) { .atask-fab { right: 12px; bottom: 12px; font-size: 14px; padding: 10px 16px; } }
