/* Standalone execution components. Palette falls back outside the app shell. */
.execution-stack { box-sizing: border-box; min-width: 0; padding: 10px; margin: 0 0 12px; border: 1px solid var(--border, #2a3035); background: var(--canvas, #0b0d0e); color: var(--text, #e6e6e6); font: 14px/1.5 ui-monospace, Consolas, monospace; }
.execution-stack .hidden { display: none !important; }
.execution-stack summary { position: relative; cursor: pointer; padding: 10px 12px; overflow-wrap: anywhere; font-weight: 700; background: #10272b; border-left: 3px solid #64d8e5; color: #a5e8ef; }
.execution-stack .stack-name-input { box-sizing: border-box; width: min(32ch, 100%); min-width: 0; font: inherit; padding: 2px 5px; color: #c3f1f5; background: #0c1e21; border: 1px solid #64d8e5; }
.execution-stack-progress { display: inline-block; margin-left: 8px; color: #9ec8ce; font-size: 12px; font-weight: 400; }
.execution-stack-toolbar { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.execution-stack-toolbar .row-button { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; width: 28px; height: 30px; padding: 5px; color: inherit; background: var(--surface, #101315); border: 1px solid var(--border, #2a3035); border-radius: 2px; cursor: pointer; }
.execution-stack-toolbar .row-button svg { width: 16px; height: 16px; }
.execution-stack .ghost-button { font: inherit; font-size: 12px; cursor: pointer; padding: 5px 8px; border: 1px solid var(--border, #2a3035); border-radius: 2px; color: inherit; background: var(--surface, #101315); }
.execution-stack button:disabled { opacity: .45; cursor: default; }
.execution-stack-cards { display: grid; gap: 6px; list-style: none; padding: 0; margin: 8px 0; }
.execution-stack-card { position: relative; box-sizing: border-box; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; min-height: 52px; padding: 9px; border: 1px solid var(--border, #2a3035); border-left-width: 3px; border-radius: 0; background: var(--surface, #101315); color: inherit; overflow-wrap: anywhere; }
.execution-stack-card .row-primary { display: flex; align-items: flex-start; gap: 8px; min-width: 0; flex: 1 1 220px; }
.execution-stack-card .todo-text { min-width: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.execution-stack-card .row-controls { position: relative; display: flex; flex-wrap: wrap; align-items: center; min-height: 28px; min-width: min(100%, 260px); margin-left: auto; gap: 6px; }
.execution-stack-card .metadata { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: var(--text-muted, #8a9299); font-size: 12px; }
.execution-stack-card .row-actions { position: static; display: flex; flex-wrap: nowrap; gap: 4px; margin-left: auto; padding: 0; border: 0; background: transparent; transform: none; transition: none; }
.execution-stack-card .row-button { display: inline-flex; align-items: center; justify-content: center; width: 28px; min-width: 28px; height: 28px; padding: 5px; cursor: pointer; background: transparent; color: inherit; border: 1px solid var(--border, #2a3035); border-radius: 2px; }
.execution-stack-card .row-button svg { width: 16px; height: 16px; }
.execution-stack-state { font-size: 10px; font-weight: 700; line-height: 16px; white-space: nowrap; padding: 1px 4px; border: 1px solid currentColor; color: var(--text-muted, #8a9299); }
.execution-stack-card[data-status="Completed"] { border-left-color: #7cff6b; background: #102314; }
.execution-stack-card[data-status="Completed"] .execution-stack-state { color: #7cff6b; }
.execution-stack-card[data-status="Active Task"], .execution-stack-card[data-status="Next task"] { border-left-color: #64d8e5; background: #10272b; }
.execution-stack-card[data-status="Active Task"] .execution-stack-state, .execution-stack-card[data-status="Next task"] .execution-stack-state { color: #64d8e5; }
.execution-stack-card[data-status="Unavailable"] { border-style: dashed; color: var(--text-muted, #8a9299); }
.execution-stack-card.is-grabbed { border-color: #f3ad55; background: #332414; box-shadow: inset 3px 0 0 #f3ad55; }
.execution-stack-card.is-grabbed .execution-stack-state { color: #f3ad55; }
.execution-stack-card.pending-remove { border-color: #ff6b6b; background: #32191b; }
.execution-stack-card .execution-stack-remove-warning { position: absolute; inset: 0; transform: none; max-width: none; display: none; align-items: center; padding: 0; background: #32191b; color: #ffb7b7; font-size: 11px; line-height: 14px; font-weight: 700; pointer-events: none; }
.execution-stack-card.pending-remove .execution-stack-remove-warning { display: flex; }
.execution-stack-card.pending-remove .row-controls > :not(.execution-stack-remove-warning) { visibility: hidden; pointer-events: none; }
.execution-stack-card.pending-remove .execution-stack-children { pointer-events: none; }
.stack-header-warning:empty { display: none; }
.stack-header-warning { position: absolute; inset: 0; background: #32191b; color: #ffb7b7; padding: 6px 12px; display: flex; align-items: center; font-size: 11px; }
.execution-stack-children { display: grid; flex: 1 0 100%; gap: 8px; list-style: none; padding: 8px 0 0 18px; margin: 0; border-top: 1px solid var(--border, #2a3035); }
.execution-stack-check { display: flex; align-items: flex-start; gap: 8px; min-width: 0; }
.execution-stack-check span { overflow-wrap: anywhere; }
.execution-stack-hint { font-size: 12px; color: var(--text-muted, #8a9299); margin: 4px 0; }
.execution-stack-hint:empty { display: none; }
.execution-stack :focus-visible { outline: 2px solid var(--focus-ring, #b7ffb0); outline-offset: 2px; }
@media (max-width: 720px) {
  .execution-stack { padding: 8px; }
  .execution-stack-card .row-primary { flex-basis: 100%; }
  .execution-stack-card .row-controls { margin-left: 32px; flex: 1 1 auto; min-width: 0; }
  .execution-stack-progress { display: block; margin-left: 0; }
}
