/* Desktop conversation workspace cleanup */
.chat-content { grid-template-rows: auto minmax(0, 1fr) auto; }
.chat-heading { min-height: 72px; }
.messages { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 16px 20px; }
.composer { min-height: 82px; padding: 10px 16px 14px; }
.human-takeover-banner.moved-to-sidebar,
.conversation-actions.moved-to-sidebar,
.handoff-note.moved-to-sidebar { display: none !important; }
.details-panel { min-width: 0; overflow-y: auto; scrollbar-gutter: stable; }
.conversation-tools { padding: 0 14px 14px; display: grid; gap: 12px; }
.tool-card { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--soft-shadow); overflow: hidden; }
.tool-card-head { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; padding:13px 13px 9px; }
.tool-card-head h3 { margin:0; color:var(--navy); font-size:14px; }
.tool-card .eyebrow { margin-bottom:3px; }
.tool-state { flex:0 0 auto; padding:4px 8px; border-radius:999px; background:#eef3fa; color:var(--muted); font-size:9px; font-weight:800; letter-spacing:.06em; }
.tool-state.human { background:#fff4dd; color:#9b650e; }
.tool-state.ai { background:var(--blue-soft); color:var(--blue-strong); }
.human-detail { padding:0 13px 10px; color:var(--muted); font-size:11px; line-height:1.45; }
.tool-actions { display:grid; grid-template-columns:1fr 1fr; gap:7px; padding:0 13px 12px; }
.tool-actions button { min-width:0; padding:8px 7px; border:1px solid var(--line); border-radius:9px; background:#fff; color:var(--navy); font-size:10px; font-weight:750; }
.tool-actions button:hover { border-color:var(--blue); color:var(--blue); }
.tool-actions .danger-action { color:var(--danger); }
.handoff-side { margin:0 13px 12px; padding:9px 10px; border-radius:9px; background:#f7fbff; color:var(--muted); font-size:10px; line-height:1.4; }
.template-tool { padding-bottom:12px; }
.tool-help { margin:0 13px 10px; color:var(--muted); font-size:10px; line-height:1.45; }
.template-field { padding:0 13px 9px; }
.template-field label { display:block; margin-bottom:4px; color:var(--muted); font-size:10px; font-weight:800; }
.template-field select, .template-field input { width:100%; height:34px; border:1px solid var(--line); border-radius:8px; outline:0; padding:0 9px; background:#f7fbff; color:var(--ink); font-size:11px; }
.side-template-preview { margin:2px 13px 10px; padding:9px; border:1px solid var(--line); border-radius:9px; background:#fafcff; color:var(--ink); font-size:10px; line-height:1.45; white-space:pre-wrap; max-height:110px; overflow:auto; }
.side-template-error { margin:0 13px 9px; color:var(--danger); font-size:10px; line-height:1.35; }
.side-template-send { width:calc(100% - 26px); margin:0 13px; min-height:36px; border:0; border-radius:9px; color:#fff; background:linear-gradient(90deg,var(--blue),var(--blue-strong)); font-size:11px; font-weight:800; }
.side-template-send:disabled { opacity:.55; cursor:not-allowed; }

@media (max-width: 1180px) {
  .app-shell { grid-template-columns: 72px minmax(280px, 330px) minmax(400px, 1fr) 270px; gap:12px; padding:12px; }
}

@media (max-width: 900px) {
  .conversation-tools { padding-top:10px; }
  .details-panel { display:none; }
}
