/*
 * Amplify — Human Support v2
 *
 * Purpose: Visual contract for handoff continuation modes and CRM human-support tickets.
 * Invariants: Mode controls never imply a different notification destination; CRM answers are internal guidance, not direct customer messages.
 * Maintenance: Keep state semantics in the backend. CSS only communicates current mode/status and must not encode business eligibility.
 */
.handoff-resolution-mode{margin-top:18px;padding-top:16px;border-top:1px solid rgba(255,255,255,.07)}
.handoff-mode-options{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:8px}
.handoff-mode-option{min-height:67px;padding:11px 12px;border:1px solid rgba(255,255,255,.1);border-radius:12px;background:rgba(255,255,255,.018);color:var(--muted);text-align:left;font:inherit;cursor:pointer;transition:150ms ease}
.handoff-mode-option strong{display:block;color:var(--text);font-size:11.8px;font-weight:780;line-height:1.35}
.handoff-mode-option small{display:block;margin-top:4px;color:var(--soft);font-size:9.8px;line-height:1.42}
.handoff-mode-option:hover{border-color:rgba(254,233,147,.24);background:rgba(254,233,147,.035)}
.handoff-mode-option.selected{border-color:rgba(254,233,147,.38);background:rgba(254,233,147,.075);box-shadow:inset 0 0 0 1px rgba(254,233,147,.035)}
.handoff-mode-option.selected strong{color:var(--gold)}
.handoff-mode-option:disabled{opacity:.58;cursor:wait}
.handoff-mode-help{margin:9px 0 0!important;color:var(--soft)!important;font-size:10.4px!important;line-height:1.55!important}
.crm-badge-human-ticket{border-color:rgba(254,233,147,.27)!important;background:rgba(254,233,147,.075)!important;color:var(--gold)!important}
.crm-human-support-section{border-color:rgba(254,233,147,.13)!important;background:linear-gradient(180deg,rgba(254,233,147,.018),rgba(255,255,255,.009))}
.crm-human-support-title{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:13px}
.crm-human-support-title h3{margin:0}
.crm-human-support-title p{max-width:620px;margin:5px 0 0;color:var(--soft);font-size:11px;line-height:1.55}
.crm-human-ticket-list{display:grid;gap:10px}
.crm-human-ticket{padding:14px;border:1px solid rgba(255,255,255,.085);border-radius:14px;background:rgba(255,255,255,.018)}
.crm-human-ticket.open{border-color:rgba(254,233,147,.18)}
.crm-human-ticket.failed{border-color:rgba(255,160,120,.2);background:rgba(255,130,90,.025)}
.crm-human-ticket.resolved{border-color:rgba(111,220,145,.16);background:rgba(111,220,145,.02)}
.crm-human-ticket-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.crm-human-ticket-head strong{display:block;margin-top:3px;color:var(--text);font-size:13px}
.crm-human-ticket-eyebrow{display:block;color:var(--soft);font-size:9.5px;font-weight:800;letter-spacing:.07em;text-transform:uppercase}
.crm-human-ticket-block{margin-top:12px;padding-top:11px;border-top:1px solid rgba(255,255,255,.065)}
.crm-human-ticket-block>span{display:block;margin-bottom:5px;color:var(--soft);font-size:9.7px;font-weight:800;text-transform:uppercase;letter-spacing:.05em}
.crm-human-ticket-block p{margin:0;color:rgba(244,244,242,.78);font-size:12.2px;line-height:1.62;white-space:pre-wrap}
.crm-human-ticket-block.sent p{padding:10px 11px;border-radius:10px;background:rgba(255,255,255,.026);color:var(--text)}
.crm-human-ticket-block small{display:block;margin-top:6px;color:var(--soft);font-size:9.8px}
.crm-human-ticket-warning{display:grid;gap:4px;margin-top:12px;padding:10px 11px;border:1px solid rgba(255,176,120,.2);border-radius:10px;background:rgba(255,140,80,.04)}
.crm-human-ticket-warning strong{color:#efc49a;font-size:11.2px}.crm-human-ticket-warning span{color:var(--muted);font-size:10.5px;line-height:1.5}
.crm-human-ticket-progress{margin-top:12px;padding:10px 11px;border-radius:10px;background:rgba(254,233,147,.045);color:var(--gold-soft);font-size:10.8px;line-height:1.5}
.crm-human-ticket-composer{margin-top:13px;padding-top:12px;border-top:1px solid rgba(255,255,255,.075)}
.crm-human-ticket-composer label{display:block;margin-bottom:7px;color:var(--text);font-size:11.3px;font-weight:750}
.crm-human-ticket-textarea{width:100%;min-height:104px;padding:11px 12px;border:1px solid rgba(255,255,255,.11);border-radius:11px;background:#101010;color:var(--text);font:inherit;font-size:12.3px;line-height:1.6;resize:vertical;outline:none}
.crm-human-ticket-textarea:focus{border-color:rgba(254,233,147,.4);box-shadow:0 0 0 3px rgba(254,233,147,.035)}
.crm-human-ticket-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:9px}.crm-human-ticket-actions>span{max-width:430px;color:var(--soft);font-size:9.9px;line-height:1.45}
@media(max-width:760px){.handoff-mode-options{grid-template-columns:1fr}.crm-human-support-title,.crm-human-ticket-actions{display:grid}.crm-human-ticket-actions .monitoring-data-button{width:100%}}

/* CRM monitoring: human intervention is an independent filter dimension.
 * It deliberately uses the exact same select language as the remaining CRM filters. */
#crmPage .monitoring-filterbar{grid-template-columns:repeat(7,minmax(115px,1fr))}
@media(max-width:1180px){#crmPage .monitoring-filterbar{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:760px){#crmPage .monitoring-filterbar{grid-template-columns:1fr}}
.crm-human-ticket-convert{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:13px;padding-top:12px;border-top:1px solid rgba(255,255,255,.075)}
.crm-human-ticket-convert>span{max-width:430px;color:var(--soft);font-size:9.9px;line-height:1.5}
