/* Scoped sales workbench styles; existing Chat and orchestration are unchanged. */
.turn-workbench { min-width: 0; }
.turn-workbench .orch-panel-head { align-items: flex-start; flex-wrap: wrap; gap: 12px; }
.turn-workbench label { display: flex; flex-direction: column; gap: 6px; min-width: 0; color: var(--muted); font-size: 13px; }
.turn-workbench input:not([type="checkbox"]), .turn-workbench textarea, .turn-workbench select { box-sizing: border-box; width: 100%; min-width: 0; max-width: 100%; padding: 9px 11px; color: var(--ink, #172b4d); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; font: inherit; }
.turn-workbench textarea { resize: vertical; min-height: 100px; line-height: 1.6; }
.turn-workbench input:focus, .turn-workbench textarea:focus, .turn-workbench select:focus { outline: 2px solid var(--blue); outline-offset: 2px; }
.turn-settings { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 12px; align-items: end; margin: 16px 0; }
.turn-scenarios { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; align-items: center; font-size: 12px; color: var(--muted); }
.turn-scenario { cursor: pointer; padding: 6px 10px; border-radius: 20px; border: 1px solid var(--line); background: var(--surface); color: inherit; font: inherit; }
.turn-scenario.is-selected { color: var(--blue); border-color: var(--blue); background: var(--blue-soft, #eef5ff); }
.turn-list { display: grid; gap: 20px; }
.turn-card { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; background: var(--surface); overflow-wrap: anywhere; }
.turn-card-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; }
.turn-status { display: inline-block; padding: 4px 9px; border-radius: 20px; font-size: 12px; background: var(--blue-soft, #eef5ff); color: var(--blue); }
.turn-status.is-completed { background: #eaf7ef; color: #227044; }
.turn-status.is-unsaved, .turn-status.is-failed, .turn-status.is-executionFailed, .turn-status.is-executionUnknown, .turn-status.is-awaiting_confirmation, .turn-status.is-queued { background: var(--amber-soft); color: var(--amber); }
.turn-status.is-blocked { background: #fff0ee; color: #b42318; }
.turn-customer-message { padding: 12px; margin-top: 12px; border-radius: 8px; background: var(--blue-soft, #eef5ff); white-space: pre-wrap; line-height: 1.6; }
.turn-progress { color: var(--muted); font-size: 12px; margin: 14px 0; }
.turn-progress p { margin: 6px 0; }
.turn-progress ol { padding-left: 18px; margin: 8px 0; border-left: 2px solid var(--line); list-style: none; }
.turn-tool { padding: 7px 0; position: relative; }
.turn-tool::before { content: ''; position: absolute; left: -23px; top: 12px; width: 8px; height: 8px; border-radius: 50%; background: var(--blue); }
.turn-tool.is-ok::before { background: #227044; }
.turn-tool.is-error::before, .turn-tool.is-timeout::before, .turn-tool.is-partial::before, .turn-tool.is-empty::before { background: var(--amber); }
.turn-tool.is-rejected::before { background: #b42318; }
.turn-draft-card { display: grid; gap: 16px; border-top: 1px solid var(--line); padding-top: 14px; }
.turn-draft-card > *, .turn-confirm > * { min-width: 0; }
.turn-workbench h3, .turn-workbench h4 { color: var(--ink, #172b4d); margin: 0 0 8px; font-size: 14px; }
.turn-workbench p { line-height: 1.6; }
.turn-draft-card p { margin: 0; }
.turn-draft textarea { min-height: 140px; }
.turn-plan { overflow-x: auto; max-width: 100%; font-size: 13px; line-height: 1.65; }
.turn-plan table { width: 100%; border-collapse: collapse; margin: 10px 0; }
.turn-plan th, .turn-plan td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; min-width: 90px; }
.turn-plan pre { overflow-x: auto; }
.turn-evidence, .turn-gaps, .turn-next-check { font-size: 12px; color: var(--muted); }
.turn-workbench ul { margin: 4px 0; padding-left: 20px; line-height: 1.6; }
.turn-risk { font-size: 12px; padding: 10px 12px; border-radius: 8px; background: #f4f7f9; }
.turn-risk.is-medium { background: var(--amber-soft); border-left: 3px solid var(--amber); }
.turn-risk.is-high { background: #fff0ee; color: #b42318; border-left: 3px solid #b42318; }
.turn-confirm { margin-top: 16px; padding: 14px; border: 1px solid var(--amber); background: var(--amber-soft); border-radius: 10px; }
.turn-args { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 12px 0; }
.turn-buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.turn-buttons > label, .turn-buttons > p { flex-basis: 100%; }
.turn-buttons button:disabled { opacity: .45; cursor: not-allowed; }
.turn-error { margin: 12px 0; padding: 12px; border-radius: 8px; background: var(--amber-soft); color: var(--amber); font-size: 13px; }
.turn-preview { padding: 12px; color: var(--muted); font-size: 13px; white-space: pre-wrap; }
.turn-trace { display: block; margin-top: 14px; color: var(--muted); font-size: 10px; }
.turn-confirm-result { margin-top: 12px; color: #227044; font-size: 13px; }
.turn-confirm-result.is-manual, .turn-confirm-result.is-pending { color: var(--amber); }
@media (max-width: 760px) {
 .turn-settings, .turn-args { grid-template-columns: minmax(0, 1fr); }
 .turn-card { padding: 12px; }
 .turn-workbench .orch-panel-head > label { width: 100%; }
 .turn-buttons .button { max-width: 100%; white-space: normal; }
}
/* Degraded notices, session status, read-only parameters and write results. */
.turn-status.is-degraded { background: var(--amber-soft); color: var(--amber); }
.turn-degraded { padding: 10px 12px; border-radius: 8px; background: var(--amber-soft); color: var(--amber); font-size: 13px; }
.turn-card[data-turn-status="blocked"] .turn-error { background: #fff0ee; color: #b42318; }
.turn-session-status { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.turn-session-status:empty { margin: 0; }
.turn-instruction { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.turn-instruction-input { margin: 10px 0 12px; }
.turn-args label.is-readonly input, .turn-args label.is-readonly textarea { background: var(--subtle); color: var(--muted); }
.turn-write-results { margin: 6px 0 0; padding-left: 18px; font-size: 13px; }
.turn-write-results li.is-unknown, .turn-write-results li.is-failed { color: #b42318; font-weight: 600; }
.turn-feedback-done { margin: 0; color: #227044; font-weight: 600; }
.turn-confirm .turn-error { margin: 8px 0; }

.turn-reason-picker { min-width: 0; width: 100%; display: grid; gap: 8px; margin: 8px 0; padding: 10px; border: 1px solid var(--line); border-radius: 8px; }
.turn-reason-picker .button[aria-pressed="true"] { border-color: var(--blue); background: var(--subtle); box-shadow: inset 0 0 0 1px var(--blue); }
.turn-reason-picker > .button { justify-self: start; }
