/* agent-shell.css: named-agent workspace (docs/agent-workspace-contracts.md). Owner: Claude (integration).
   Sidebar agent list and ＋添加智能体, the create dialog, an agent's chat home and its secondary panel.
   Department colours come from agent-identity.css tokens (--aw-sales, --aw-production, --aw-procurement and their
   -soft/-deep variants); the fallbacks below keep the page legible before that sheet's tokens apply. QIHU gold stays the
   brand/commander accent. Status colour is never the only signal: every badge carries its Chinese label. */

[data-agent-type="sales"]{--aw-type:var(--aw-sales,#2563eb);--aw-type-soft:var(--aw-sales-soft,#e8effd);--aw-type-deep:var(--aw-sales-deep,#1d4ed8)}
[data-agent-type="production"]{--aw-type:var(--aw-production,#0f8f86);--aw-type-soft:var(--aw-production-soft,#e2f4f1);--aw-type-deep:var(--aw-production-deep,#0b6b64)}
[data-agent-type="procurement"]{--aw-type:var(--aw-procurement,#7c3aed);--aw-type-soft:var(--aw-procurement-soft,#f0e9fd);--aw-type-deep:var(--aw-procurement-deep,#5b21b6)}
.shell[data-has-composer]{--aw-composer-h:118px}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}

/* ---- sidebar --------------------------------------------------------------------------------------------------- */
.agent-shell .nav-commander{display:grid;place-items:center;width:22px;height:22px;flex:none}
.agent-shell .nav-commander img{display:block;width:auto;height:22px;max-width:22px}
.agent-shell .nav[data-nav-commander].active{background:var(--ui-warning-surface);border-color:var(--ui-warning-line)}
.agent-nav-section{display:flex;flex-direction:column;gap:4px;margin-top:6px}
.agent-shell .agent-caption{display:flex;align-items:center;gap:6px}
.agent-count{display:inline-grid;place-items:center;min-width:18px;height:18px;padding:0 5px;border-radius:999px;background:var(--ui-soft);color:var(--ui-secondary);font-size:calc(11px * var(--qihu-user-text-scale,1));font-weight:600;letter-spacing:0}
.agent-shell .agent-nav{gap:10px;padding:7px 10px;min-height:48px}
.agent-shell .agent-nav .aw-avatar{display:grid;place-items:center;width:30px;height:30px;flex:none;border-radius:9px;background:var(--aw-type-soft);overflow:hidden}
.agent-shell .agent-nav .aw-avatar svg{width:30px;height:30px}
.agent-nav-text{display:flex;flex-direction:column;min-width:0;flex:1;line-height:1.25}
.agent-nav-text b{font-weight:600;color:var(--ui-ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.agent-nav-text small{color:var(--aw-type-deep);font-size:calc(12px * var(--qihu-user-text-scale,1))}
.agent-shell .agent-nav.active{background:var(--aw-type-soft);border-color:var(--aw-type);box-shadow:inset 3px 0 var(--aw-type)}
.agent-shell .agent-add{color:var(--ui-secondary);border:1px dashed var(--ui-line-strong);background:transparent;min-height:42px}
.agent-shell .agent-add:hover{color:var(--ui-ink);border-color:var(--ui-secondary);background:var(--ui-soft)}
.agent-add-mark{display:grid;place-items:center;width:30px;height:30px;flex:none;border-radius:9px;background:var(--ui-soft);font-weight:600}
.agent-nav-empty{margin:4px 12px;color:var(--ui-muted);font-size:calc(12px * var(--qihu-user-text-scale,1))}
.nav-records{display:flex;flex-direction:column;gap:2px;margin-top:6px}
.agent-shell .nav-records-item{min-height:38px;padding:7px 12px;font-size:calc(13px * var(--qihu-user-text-scale,1))}
.sidebar-collapsed .agent-nav .aw-status,.sidebar-collapsed .agent-count,.sidebar-collapsed .agent-nav-empty{display:none}

/* ---- create dialog --------------------------------------------------------------------------------------------- */
.agent-dialog-backdrop{position:fixed;inset:0;z-index:60;background:var(--ui-overlay,#0f172a73)}
.agent-dialog{position:fixed;z-index:61;left:50%;top:50%;transform:translate(-50%,-50%);width:min(600px,calc(100vw - 32px));max-height:calc(100vh - 48px);overflow:auto;padding:22px 24px 24px;border:1px solid var(--ui-line);border-radius:16px;background:var(--ui-surface);box-shadow:var(--ui-shadow,0 18px 48px #0f172a33);color:var(--ui-ink)}
.agent-dialog>header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px}
.agent-dialog h2{margin:0;font-size:calc(19px * var(--qihu-user-text-scale,1))}
.agent-dialog-close{display:grid;place-items:center;width:40px;height:40px;padding:0;border:0;border-radius:10px;background:transparent;color:var(--ui-secondary);font-size:22px}
.agent-dialog-close:hover{background:var(--ui-soft);color:var(--ui-ink)}
.agent-create-lead{margin:0 0 14px;color:var(--ui-secondary)}
.agent-type-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.agent-type-card{display:flex;flex-direction:column;align-items:flex-start;gap:10px;min-height:150px;padding:14px;text-align:left;border:1px solid var(--ui-line);border-radius:14px;background:var(--ui-surface);color:var(--ui-ink)}
.agent-type-card:hover,.agent-type-card:focus-visible{border-color:var(--aw-type);background:var(--aw-type-soft)}
.agent-type-card .aw-avatar{display:grid;place-items:center;width:56px;height:56px;border-radius:14px;background:var(--aw-type-soft)}
.agent-type-card .aw-avatar svg{width:52px;height:52px}
.agent-type-card b{display:block;font-size:calc(15px * var(--qihu-user-text-scale,1))}
.agent-type-card small{display:block;margin-top:3px;color:var(--ui-secondary);line-height:1.45}
.agent-create-note{margin:14px 0 0;color:var(--ui-muted);font-size:calc(12px * var(--qihu-user-text-scale,1))}
.agent-create-form{display:flex;flex-direction:column;gap:10px}
.agent-create-chosen{display:flex;align-items:center;gap:12px;padding:10px 12px;border-radius:12px;background:var(--aw-type-soft)}
.agent-create-chosen .aw-avatar svg{width:44px;height:44px}
.agent-create-chosen small{display:block;color:var(--ui-secondary)}
.agent-create-form label{font-weight:600}
.agent-create-form label span{font-weight:400;color:var(--ui-muted);margin-left:6px;font-size:calc(12px * var(--qihu-user-text-scale,1))}
.agent-create-form input{min-height:44px;font-size:calc(16px * var(--qihu-user-text-scale,1))}
.agent-create-actions{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:6px}

/* ---- agent home: conversation first ---------------------------------------------------------------------------- */
.agent-layout{display:grid;grid-template-columns:minmax(0,1fr);gap:0;min-height:calc(100vh - 76px)}
.agent-layout.agent-layout-panel{grid-template-columns:minmax(0,1fr) 340px}
.agent-chat-page{display:flex;flex-direction:column;min-width:0;max-width:900px;width:100%;margin:0 auto;padding:18px 24px 0}
.agent-chat-head{display:flex;align-items:center;gap:14px;padding-bottom:14px;border-bottom:1px solid var(--ui-line)}
.agent-chat-head>.aw-avatar{display:grid;place-items:center;width:56px;height:56px;flex:none;border-radius:16px;background:var(--aw-type-soft)}
.agent-chat-head>.aw-avatar svg{width:52px;height:52px}
.agent-chat-title{flex:1;min-width:0}
.agent-chat-title h1{margin:0;font-size:calc(21px * var(--qihu-user-text-scale,1));overflow-wrap:anywhere}
.agent-chat-title p{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:5px 0 0}
.agent-type-tag{padding:2px 8px;border-radius:999px;background:var(--aw-type-soft);color:var(--aw-type-deep);font-size:calc(12px * var(--qihu-user-text-scale,1));font-weight:600}
.agent-model-chip{color:var(--ui-muted);font-size:calc(12px * var(--qihu-user-text-scale,1))}
.agent-panel-toggle{flex:none;min-height:40px;padding:8px 14px;border:1px solid var(--ui-line);border-radius:10px;background:var(--ui-surface);color:var(--ui-ink)}
.agent-panel-toggle[aria-expanded="true"]{border-color:var(--aw-type);background:var(--aw-type-soft)}
.agent-chat-body{flex:1;padding:18px 0}
.agent-messages{display:flex;flex-direction:column;gap:16px;margin:0;padding:0;list-style:none}
.agent-msg{display:flex;gap:10px;max-width:100%}
.agent-msg-user{justify-content:flex-end}
.agent-msg-user .agent-bubble{max-width:78%;background:var(--ui-surface-subtle);border-color:var(--ui-line)}
.agent-msg-avatar{flex:none;display:grid;place-items:center;width:32px;height:32px;border-radius:10px;background:var(--aw-type-soft)}
.agent-msg-avatar svg{width:30px;height:30px}
.agent-bubble{min-width:0;max-width:calc(100% - 42px);padding:11px 14px;border:1px solid var(--ui-line);border-radius:14px;background:var(--ui-surface);line-height:1.65;white-space:pre-wrap;overflow-wrap:anywhere}
.agent-answer{white-space:pre-wrap}
.agent-bubble p{margin:0}
.agent-bubble-pending{display:flex;align-items:center;gap:12px;white-space:normal}
.agent-bubble-failed{border-color:var(--ui-warning-line);background:var(--ui-warning-surface);white-space:normal}
.agent-bubble-failed .text-action{margin-top:6px}
.agent-bubble-withheld{color:var(--ui-secondary);border-style:dashed;white-space:normal}
.agent-cites{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin-top:10px;white-space:normal}
.agent-cites>span{color:var(--ui-muted);font-size:calc(12px * var(--qihu-user-text-scale,1))}
.agent-cite{padding:2px 8px;border:1px solid var(--ui-line);border-radius:999px;font-size:calc(12px * var(--qihu-user-text-scale,1));color:var(--ui-ink);text-decoration:none}
.agent-cites-none,.agent-answer-foot,.agent-claim-note{margin-top:8px!important;color:var(--ui-muted);font-size:calc(12px * var(--qihu-user-text-scale,1));white-space:normal}
.agent-claim-note{color:var(--ui-warning)}
.agent-empty{padding:28px 4px;color:var(--ui-secondary)}
.agent-empty h2{margin:0 0 6px;color:var(--ui-ink);font-size:calc(18px * var(--qihu-user-text-scale,1))}
.agent-examples{display:flex;flex-direction:column;align-items:flex-start;gap:8px;margin-top:14px}
.agent-examples button{max-width:100%;padding:9px 13px;border:1px solid var(--ui-line);border-radius:12px;background:var(--ui-surface);color:var(--ui-ink);text-align:left;line-height:1.45}
.agent-examples button:hover{border-color:var(--aw-type);background:var(--aw-type-soft)}
.agent-composer{position:sticky;bottom:0;z-index:5;display:flex;flex-direction:column;gap:8px;margin:0 -8px;padding:10px 8px 16px;background:var(--ui-canvas,var(--ui-surface))}
.agent-composer textarea{min-height:58px;max-height:220px;resize:vertical;padding:11px 13px;border:1px solid var(--ui-line-strong);border-radius:14px;background:var(--ui-surface);color:var(--ui-ink);font:inherit;font-size:calc(15px * var(--qihu-user-text-scale,1))}
.agent-composer textarea:focus{border-color:var(--aw-type);outline:2px solid var(--ui-focus);outline-offset:1px}
.agent-composer-bar{display:flex;align-items:center;justify-content:flex-end;gap:10px}
.agent-mode{display:flex;align-items:center;gap:6px;margin-right:auto;color:var(--ui-muted);font-size:calc(12px * var(--qihu-user-text-scale,1))}
.agent-mode select{min-height:36px}
.agent-composer .primary{min-width:88px;min-height:40px}
.agent-missing{padding-top:40px}

/* ---- secondary panel: desktop column, phone sheet -------------------------------------------------------------- */
.agent-panel{position:sticky;top:0;align-self:start;max-height:100vh;overflow:auto;padding:18px 18px 28px;border-left:1px solid var(--ui-line);background:var(--ui-surface)}
.agent-panel>header{display:flex;align-items:center;justify-content:space-between;margin-bottom:6px}
.agent-panel h2{margin:0;font-size:calc(16px * var(--qihu-user-text-scale,1))}
.agent-panel section{padding:12px 0;border-top:1px solid var(--ui-line)}
.agent-panel h3{margin:0 0 6px;font-size:calc(14px * var(--qihu-user-text-scale,1))}
.agent-panel p{margin:0 0 6px;color:var(--ui-secondary);line-height:1.6}
.agent-panel label{display:block;margin-bottom:6px;color:var(--ui-secondary);font-size:calc(13px * var(--qihu-user-text-scale,1))}
.agent-panel textarea{width:100%;padding:9px 11px;border:1px solid var(--ui-line-strong);border-radius:10px;font:inherit;background:var(--ui-surface);color:var(--ui-ink)}
.agent-panel-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px;margin-top:8px}
.agent-panel-actions small{color:var(--ui-muted)}
.agent-rename>div{display:flex;gap:8px}
.agent-rename input{flex:1;min-width:0;min-height:40px}
.agent-panel .danger{color:var(--ui-danger);border-color:var(--ui-danger-line)}
.agent-notice{padding:8px 10px;border-radius:10px;background:var(--ui-success-surface);color:var(--ui-ink)}
.agent-muted{color:var(--ui-muted)!important}
.agent-instructions-read p{white-space:pre-wrap;color:var(--ui-ink)}

@media(max-width:1180px){
  .agent-layout.agent-layout-panel{grid-template-columns:minmax(0,1fr)}
  .agent-layout-panel .agent-panel{position:fixed;z-index:40;top:0;right:0;bottom:0;width:min(380px,100vw);max-height:none;box-shadow:var(--ui-shadow,0 18px 48px #0f172a33)}
}
@media(max-width:760px){
  .agent-type-grid{grid-template-columns:minmax(0,1fr)}
  .agent-type-card{flex-direction:row;align-items:center;min-height:0}
  .agent-dialog{top:auto;bottom:0;left:0;right:0;transform:none;width:100%;max-height:92vh;border-radius:18px 18px 0 0;padding-bottom:calc(20px + env(safe-area-inset-bottom))}
  .agent-chat-page{padding:10px 14px 0}
  .agent-chat-head{gap:10px}
  .agent-chat-head>.aw-avatar{width:44px;height:44px;border-radius:12px}
  .agent-chat-head>.aw-avatar svg{width:40px;height:40px}
  .agent-msg-user .agent-bubble{max-width:88%}
  .agent-layout-panel .agent-panel{top:auto;left:0;width:100%;max-height:86vh;border-left:0;border-top:1px solid var(--ui-line);border-radius:18px 18px 0 0;padding-bottom:calc(24px + env(safe-area-inset-bottom))}
  .agent-composer{padding-bottom:calc(12px + env(safe-area-inset-bottom))}
  .agent-composer textarea{font-size:16px}
}

/* ---- phone (MN2 shell): 总控 tab mark, 智能体 list ------------------------------------------------------------------ */
.mn-commander{display:grid;place-items:center;width:22px;height:22px}
.mn-commander img{display:block;width:auto;height:22px;max-width:22px}
.mn-agent-list{gap:6px;margin-top:0}
.mn-agent-list .agent-caption{display:none}
.mn-agent-list .nav{display:flex;align-items:center;gap:12px;width:100%;min-height:58px;padding:10px 12px;border:1px solid var(--ui-line);border-radius:14px;background:var(--ui-surface);color:var(--ui-ink);text-align:left}
.mn-agent-list .agent-nav .aw-avatar{display:grid;place-items:center;width:38px;height:38px;flex:none;border-radius:11px;background:var(--aw-type-soft)}
.mn-agent-list .agent-nav .aw-avatar svg{width:36px;height:36px}
.mn-agent-list .agent-add{justify-content:flex-start;border-style:dashed;color:var(--ui-secondary)}
.mn-shell[data-has-composer] .agent-chat-head{padding-top:4px}
.mn-shell[data-has-composer] .agent-chat-head>.aw-avatar,.mn-shell[data-has-composer] .agent-chat-title h1{display:none}
.as-commander{display:grid;place-items:center;width:48px;height:48px;flex:none;border-radius:14px;background:var(--ui-warning-surface)}
.as-commander img{display:block;width:auto;height:40px;max-width:40px}

/* ---- 经营总控 delegation ------------------------------------------------------------------------------------------ */
.commander-delegate{margin:0 0 18px;padding:16px 18px;border:1px solid var(--ui-warning-line);border-radius:14px;background:var(--ui-surface)}
.commander-delegate>header h2{margin:0 0 4px;font-size:calc(16px * var(--qihu-user-text-scale,1))}
.commander-delegate>header p{margin:0 0 10px;color:var(--ui-secondary);line-height:1.6}
.commander-delegate textarea{width:100%;min-height:72px;padding:10px 12px;border:1px solid var(--ui-line-strong);border-radius:12px;font:inherit;background:var(--ui-surface);color:var(--ui-ink)}
.delegate-targets{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0 0;padding:0;border:0}
.delegate-targets legend{margin-bottom:6px;color:var(--ui-secondary);font-size:calc(13px * var(--qihu-user-text-scale,1))}
.delegate-target{display:flex;align-items:center;gap:8px;min-height:44px;padding:6px 10px;border:1px solid var(--ui-line);border-radius:12px;cursor:pointer}
.delegate-target:has(input:checked){border-color:var(--aw-type);background:var(--aw-type-soft)}
.delegate-target .aw-avatar svg{width:26px;height:26px}
.delegate-target span{display:flex;flex-direction:column;line-height:1.2}
.delegate-target small{color:var(--aw-type-deep)}
.delegate-actions{display:flex;justify-content:flex-end;align-items:center;gap:10px;margin-top:10px}
.delegate-plan{margin-top:14px;padding:12px 14px;border-radius:12px;background:var(--ui-warning-surface)}
.delegate-plan h3,.delegate-history h3{margin:0 0 6px;font-size:calc(14px * var(--qihu-user-text-scale,1))}
.delegate-plan-text{margin:0 0 8px;overflow-wrap:anywhere}
.delegate-plan ol{margin:0;padding-left:20px}
.delegate-plan li{margin:6px 0}
.delegate-plan li span{display:block;color:var(--ui-secondary);font-size:calc(13px * var(--qihu-user-text-scale,1))}
.delegate-history{margin-top:14px}
.delegate-history article{padding:10px 0;border-top:1px solid var(--ui-line)}
.delegate-history article p{margin:0 0 6px;overflow-wrap:anywhere}
.delegate-history ul{display:flex;flex-direction:column;gap:6px;margin:0;padding:0;list-style:none}
.delegate-history li{display:flex;align-items:center;gap:8px}
.delegate-history li .aw-avatar svg{width:22px;height:22px}
.delegate-child-state{color:var(--ui-secondary);font-size:calc(12px * var(--qihu-user-text-scale,1))}
.delegate-child-state[data-child-state="failed"],.delegate-child-state[data-child-state="not_started"]{color:var(--ui-danger)}

/* ---- 工作台 agent board ------------------------------------------------------------------------------------------- */
.agent-board{margin:0 0 18px}
.agent-board-list{display:flex;flex-direction:column;gap:8px;margin:0;padding:0;list-style:none}
.agent-board-row{display:grid;grid-template-columns:34px minmax(0,1.2fr) auto minmax(0,1.6fr) minmax(0,1.4fr);align-items:center;gap:12px;width:100%;min-height:56px;padding:9px 12px;border:1px solid var(--ui-line);border-radius:12px;background:var(--ui-surface);color:var(--ui-ink);text-align:left}
.agent-board-row:hover{border-color:var(--aw-type)}
.agent-board-row .aw-avatar{display:grid;place-items:center;width:34px;height:34px;border-radius:10px;background:var(--aw-type-soft)}
.agent-board-row .aw-avatar svg{width:32px;height:32px}
.agent-board-name{display:flex;flex-direction:column;min-width:0}
.agent-board-name b{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.agent-board-name small{color:var(--aw-type-deep)}
.agent-board-now,.agent-board-next{color:var(--ui-secondary);font-size:calc(13px * var(--qihu-user-text-scale,1));overflow-wrap:anywhere}
@media(max-width:900px){.agent-board-row{grid-template-columns:34px minmax(0,1fr) auto}.agent-board-now,.agent-board-next{grid-column:2 / -1}}
.commander-delegate>header{position:relative}
.commander-delegate>header>button{margin-top:4px}
.commander-delegate-closed>header{display:flex;flex-wrap:wrap;align-items:center;gap:8px 16px}
.commander-delegate-closed>header p{flex:1 1 320px;margin:0}
/* The narrow desktop path (a chosen file keeps the desktop shell below 761px) turns the sidebar into a bottom bar:
   it keeps the fixed destinations only; agents and record pages stay reachable from 工作台 and 经营总控. */
@media(max-width:760px){.agent-shell>aside .agent-nav-section,.agent-shell>aside .nav-records,.agent-shell .commander-delegate{display:none}}

/* ---- 工作台 company overview ---------------------------------------------------------------------------------------- */
.overview-page .overview-head{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:12px 20px;margin:0 0 16px}
.overview-page .overview-head h1{margin:2px 0 4px;font-size:calc(24px * var(--qihu-user-text-scale,1))}
.overview-page .overview-head p{margin:0;color:var(--ui-secondary)}
.overview-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.overview-actions>button{min-height:40px;padding:8px 14px;border-radius:10px}
.overview-actions>button:not(.primary):not(.pending-jump){border:1px solid var(--ui-line);background:var(--ui-surface);color:var(--ui-ink)}
.overview-page>.agent-board{padding:14px 16px;border:1px solid var(--ui-line);border-radius:14px;background:var(--ui-surface)}
.overview-page>.agent-board .workspace-section-heading{display:flex;align-items:baseline;justify-content:space-between;margin-bottom:10px}
.overview-page>.agent-board h2{margin:0;font-size:calc(16px * var(--qihu-user-text-scale,1))}
.overview-page>.agent-board small{color:var(--ui-muted)}
.agent-messages>li{background:none;padding:0;margin:0;border:0}
.agent-mode span{white-space:nowrap}
.commander-delegate{max-width:948px;margin-left:auto;margin-right:auto;border-color:var(--ui-line)}

/* ---- 定时任务 in the agent panel ----------------------------------------------------------------------------------- */
.agent-notice-warn{background:var(--ui-warning-surface)!important}
.schedule-list{display:flex;flex-direction:column;gap:8px;margin:0 0 10px;padding:0;list-style:none}
.schedule-list li{display:flex;flex-direction:column;gap:2px;padding:8px 10px;border:1px solid var(--ui-line);border-radius:10px}
.schedule-list li span{color:var(--ui-secondary);font-size:calc(12px * var(--qihu-user-text-scale,1))}
.schedule-list li div{display:flex;gap:6px;margin-top:4px}
.schedule-form{display:flex;flex-direction:column;gap:8px}
.schedule-form label{display:flex;flex-direction:column;gap:4px;margin:0}
.schedule-form input,.schedule-form select{min-height:38px}
.schedule-when{display:flex;flex-wrap:wrap;gap:8px}
.schedule-when label{flex:1 1 120px}
.schedule-days{display:flex;flex-wrap:wrap;gap:6px 10px;margin:0;padding:0;border:0}
.schedule-days label{flex-direction:row;align-items:center;gap:4px}
.schedule-preview{display:flex;flex-direction:column;gap:4px;margin-top:10px;padding:10px 12px;border-radius:10px;background:var(--ui-warning-surface)}
.schedule-preview span{color:var(--ui-secondary);font-size:calc(13px * var(--qihu-user-text-scale,1))}
.schedule-preview .primary{align-self:flex-end;margin-top:6px}
/* On composer pages in medium windows the content spans the full width: keep only the compact 提醒 pill. */
@media(min-width:761px) and (max-width:1180px){.shell[data-has-composer] .xq-floating .companion-figure-button{display:none}}
.agent-save-notice{margin:0 0 10px;padding:12px 14px;border:1px solid var(--ui-warning-line);border-radius:12px;background:var(--ui-warning-surface)}
.agent-save-notice h2{margin:0 0 4px;font-size:calc(14px * var(--qihu-user-text-scale,1))}
.agent-save-notice p{margin:0 0 8px;color:var(--ui-ink);line-height:1.6}

/* AW-NOTIFY */
.aw-permissions{display:flex;flex-direction:column;gap:8px;margin:0}
.aw-permissions h3,.aw-permissions h4{margin:0}
.aw-permissions h4{margin-top:4px;font-size:calc(13px * var(--qihu-user-text-scale,1))}
.aw-perm-list,.aw-approval-list{display:flex;flex-direction:column;gap:8px;margin:0;padding:0;list-style:none}
.aw-perm-list li,.aw-approval-card{display:flex;flex-direction:column;align-items:flex-start;gap:6px;padding:8px 10px;border:1px solid var(--ui-line);border-radius:10px}
.aw-approval-card{background:var(--ui-warning-surface)}
.aw-approval-card p{margin:0}
.aw-approval-actions,.aw-grant-days{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.aw-grant-days fieldset,.schedule-after{display:flex;flex-wrap:wrap;gap:8px 12px;margin:0;padding:0;border:0}
.aw-grant-days label,.schedule-after label{display:flex;align-items:center;gap:6px}
.aw-approval-actions a,.aw-approval-actions button,.aw-perm-list button,.aw-grant-days button{display:inline-flex;align-items:center;min-height:40px;padding:8px 12px}
@media(max-width:760px){
.aw-approval-actions a,.aw-approval-actions button,.aw-perm-list button,.aw-grant-days button,.aw-grant-days label,.schedule-after label{min-height:44px}
}
/* /AW-NOTIFY */

/* AW-DRAFTS */
.aw-drafts{display:flex;flex-direction:column;gap:8px;margin:0 0 12px}
.aw-draft-entry,.aw-draft-sheet button,.aw-draft-actions button,.aw-draft-card a,.aw-draft-card button{display:inline-flex;align-items:center;min-height:40px;padding:8px 12px}
.aw-draft-sheet{display:flex;flex-direction:column;gap:8px;padding:12px;border:1px solid var(--ui-line);border-radius:12px;background:var(--ui-surface)}
.aw-draft-sheet h3,.aw-draft-card h3{margin:0}
.aw-draft-sheet label{display:flex;flex-direction:column;gap:4px;margin:0}
.aw-draft-sheet select,.aw-draft-sheet input{min-height:40px}
.aw-draft-list{display:flex;flex-direction:column;gap:8px;margin:0;padding:0;list-style:none}
.aw-draft-card{display:flex;flex-direction:column;align-items:flex-start;gap:6px;padding:10px 12px;border:1px solid var(--ui-line);border-radius:12px}
.aw-draft-card p,.aw-draft-stale p{margin:0}
.aw-draft-refs,.aw-draft-stale ul{margin:0;padding-left:18px}
.aw-draft-note,.aw-draft-result{color:var(--ui-secondary);line-height:1.6}
.aw-draft-result-failed,.aw-draft-result-missing,.aw-draft-result-interrupted,.aw-draft-result-cancelled{color:var(--ui-secondary)}
.aw-draft-stale{padding:10px 12px;border-radius:10px;background:var(--ui-warning-surface)}
.aw-draft-actions{display:flex;flex-wrap:wrap;gap:8px}
@media(max-width:760px){
.aw-draft-entry,.aw-draft-sheet button,.aw-draft-actions button,.aw-draft-card a,.aw-draft-card button,.aw-draft-sheet select,.aw-draft-sheet input{min-height:44px}
}
/* /AW-DRAFTS */
