.copy-tabs { margin-bottom: 20px; gap: 24px; }
.copy-tabs button { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.tab-count { color: var(--muted); font-size: 10px; font-variant-numeric: tabular-nums; }
.copy-kind { display: inline-block; padding: 1px 5px; margin-right: 8px; border: 1px solid var(--line); border-radius: 3px; font-size: 10px; }
.terminal-workspace { max-width: 1120px; min-width: 0; }
.terminal-toolbar { padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.terminal-target-fields { display: grid; grid-template-columns: minmax(150px, .9fr) minmax(170px, 1fr) minmax(220px, 1.4fr) minmax(120px, .65fr); gap: 12px; align-items: end; }
.terminal-target-fields label { min-width: 0; font-size: 11px; color: var(--muted); }
.terminal-target-fields input, .terminal-target-fields select { width: 100%; margin-top: 6px; font-size: 12px; }
.terminal-statusbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-height: 28px; margin-top: 12px; font-size: 11px; }
.terminal-output { min-height: 360px; max-height: calc(100dvh - 430px); margin: 18px 0; padding: 14px; overflow: auto; background: #15191b; border: 1px solid #30393d; border-radius: 6px; color: #dce6e7; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
:root[data-theme="dark"] .terminal-output { background: #101415; }
.terminal-output .empty { min-height: 300px; color: #849095; }
.terminal-entry { padding: 0 0 16px; margin-bottom: 16px; border-bottom: 1px solid #30393d; }
.terminal-entry:last-child { padding-bottom: 0; margin-bottom: 0; border-bottom: 0; }
.terminal-entry header { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: #9eacae; font-family: inherit; font-size: 11px; }
.terminal-entry header strong { color: #e7eeee; font-weight: 600; }
.terminal-entry header time { margin-left: auto; color: #748084; }
.terminal-exit { padding: 2px 6px; border: 1px solid #536064; border-radius: 4px; color: #b8c4c5; }
.terminal-exit.success { border-color: #337a5d; color: #8bd0aa; }
.terminal-exit.failure { border-color: #985161; color: #f0a5b1; }
.terminal-command, .terminal-result { margin: 9px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; font-size: 12px; line-height: 1.6; }
.terminal-command { color: #9cc1ff; }
.terminal-result { color: #dce6e7; }
.terminal-result.error { color: #f0a5b1; }
.terminal-command-form > label { display: block; margin-bottom: 7px; font-size: 11px; color: var(--muted); }
.terminal-command-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: end; }
.terminal-command-row textarea { min-height: 76px; resize: vertical; font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.terminal-command-row button { min-width: 88px; min-height: 42px; }
.terminal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.terminal-actions button { font-size: 11px; }
.layout-handle { position: relative; flex-shrink: 0; touch-action: none; outline-offset: 0; }
.layout-handle::after { content: ""; position: absolute; background: var(--line); border-radius: 2px; }
.layout-handle:hover::after, .layout-handle:focus-visible::after { background: var(--accent); }
.layout-handle:focus-visible { outline: 2px solid var(--accent); }
.layout-width { display: none; }
.layout-height { height: 16px; width: 100%; cursor: row-resize; border-top: 1px solid var(--line); }
.layout-height::after { width: 36px; height: 3px; left: calc(50% - 18px); top: 5px; }
:root[data-layout-height="true"] .task-output { height: var(--chat-height); min-height: 280px; max-height: 1600px; }
:root[data-layout-resizing] { user-select: none; }
:root[data-layout-resizing="width"], :root[data-layout-resizing="width"] * { cursor: col-resize !important; }
:root[data-layout-resizing="height"], :root[data-layout-resizing="height"] * { cursor: row-resize !important; }
@media (min-width: 1001px) {
  .console-grid { grid-template-columns: clamp(260px, var(--overview-width, 320px), calc(100% - 432px)) 16px minmax(0, 1fr); gap: 8px; }
  .layout-width { display: block; cursor: col-resize; min-height: 240px; }
  .layout-width::before { content: ""; position: absolute; width: 1px; background: var(--line); top: 0; bottom: 0; left: 7px; }
  .layout-width::after { height: 36px; width: 3px; top: 110px; left: 6px; }
  .task-workspace { border-left: 0; padding-left: 6px; }
  .task-search { min-width: 0; }
}
@media (min-width: 1600px) { .console-grid { --overview-width: 360px; } }
@media (min-width: 1001px) and (max-width: 1180px) { .console-grid { --overview-width: 280px; } }
:root[data-chat-expanded="true"] .layout-width { display: none; }
:root[data-chat-expanded="true"] .console-grid { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 700px) {
  .copy-tabs { gap: 16px; }
  .copy-tabs button { gap: 4px; }
  .terminal-target-fields { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
  .terminal-cwd-field { grid-column: 1 / -1; }
  .terminal-output { min-height: 300px; max-height: 55dvh; margin: 14px 0; padding: 12px; }
  .terminal-entry header time { margin-left: 0; }
  .terminal-command-row { grid-template-columns: minmax(0, 1fr); }
  .terminal-command-row button { width: 100%; }
  .terminal-actions { justify-content: stretch; }
  .terminal-actions button { flex: 1; }
  .layout-height { display: none; }
  :root[data-layout-height="true"] .task-output { height: 65dvh; min-height: 420px; max-height: none; }
}
