#agent-goal { flex: none; min-width: 0; }
.agent-goal { margin: 10px 22px 4px; border: 1px solid #e3dfe7; border-radius: 8px; background: #fcfbfd; color: #353036; font-size: 12px; }
.goal-summary { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 10px 12px; cursor: pointer; list-style: none; }
.goal-summary::-webkit-details-marker { display: none; }
.goal-summary::after { content: '⌄'; margin-left: auto; color: #817587; }
.agent-goal[open] .goal-summary::after { content: '⌃'; }
.goal-symbol { color: #775386; font-size: 18px; }
.goal-brief { flex: 1 1 80px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: #6e6573; }
.agent-goal[open] .goal-brief { display: none; }
.goal-status, .goal-command-state { border-radius: 4px; padding: 2px 6px; background: #ece8f0; color: #64526f; font-size: 10px; line-height: 16px; }
.goal-status.active, .goal-status.complete, .goal-command-state.applied { background: #e6f3ed; color: #27704f; }
.goal-status.blocked, .goal-status.budgetLimited, .goal-status.usageLimited, .goal-command-state.uncertain { background: #fff1d8; color: #886322; }
.goal-content { padding: 0 12px 12px; max-height: 260px; overflow-y: auto; }
.goal-objective { margin: 0 0 8px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; line-height: 1.5; }
.goal-metrics { color: #6f6675; font-variant-numeric: tabular-nums; }
.goal-content progress { display: block; width: 100%; height: 5px; margin: 8px 0; accent-color: #775386; }
.goal-delivery, .goal-error { margin: 7px 0; line-height: 1.5; overflow-wrap: anywhere; }
.goal-delivery { color: #826423; }
.goal-error, .goal-command-state.failed { color: #a24040; }
.goal-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.goal-actions button { font-size: 11px; padding: 5px 9px; background: #fff; border-color: #ded8e2; }
.goal-observed { display: block; color: #8c8390; font-size: 10px; margin-top: 8px; }
.goal-command-message { max-width: 640px; border: 1px solid #e2dce8; border-left: 3px solid #886297; border-radius: 6px; padding: 10px 12px; background: #fcfbfd; }
.goal-command-heading { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; margin-bottom: 5px; }
.goal-command-message .message-text { font-size: 12px; }
.goal-composer { margin: 0 10px 6px; font-size: 12px; }
.goal-preview { display: flex; gap: 3px; flex-direction: column; border-top: 1px solid #e9e3ed; padding: 9px 2px 3px; color: #675272; }
.goal-preview > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.goal-preview small { color: #8a7d91; }
.goal-preview.invalid { color: #a24040; }
.goal-suggestions { display: flex; flex-direction: column; max-height: 210px; overflow-y: auto; border: 1px solid #e2dce7; border-radius: 6px; background: white; }
.goal-suggestion { display: grid; grid-template-columns: 1fr auto; gap: 3px 8px; padding: 8px 10px; text-align: left; border: 0; border-radius: 0; background: white; font-size: 12px; }
.goal-suggestion > span { grid-column: 1 / -1; color: #807586; font-size: 11px; }
.goal-suggestion code { color: #8a7097; font-size: 10px; }
.goal-suggestion:hover, .goal-suggestion.selected { background: #f3edf7; }
@media (max-width: 700px) { .agent-goal { margin: 8px 12px 3px; } .goal-content { max-height: 200px; } .goal-brief { display: none; } .goal-status { font-size: 9px; } }
