/* Case workspace: calm secondary controls, shared palette, no raw technical labels. */
.exbot-desk-ui .head{flex-wrap:wrap;align-items:center;row-gap:12px}
.exbot-desk-ui .case-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;min-width:0}
.exbot-desk-ui .case-actions form{margin:0}
.exbot-desk-ui .case-actions .btn{padding:9px 12px!important;min-height:38px;white-space:nowrap;font-size:12px!important}
.exbot-desk-ui .case-actions .case-archive{color:#7a5270!important;border-color:#e5dce5!important;background:#fff!important}
.case-section{flex:0 0 auto;min-height:0;border-bottom:1px solid #e3ebf7;background:#fff;color:#233c60;max-width:100%}
.case-section [hidden]{display:none!important}
.case-panel{margin:0;border:0}
.case-panel>summary{list-style:none;cursor:pointer;display:flex;align-items:center;flex-wrap:wrap;gap:10px;padding:13px 20px;background:#f9fbff;color:#28456d;font-size:12px}
.case-panel>summary::-webkit-details-marker{display:none}
.case-panel>summary:focus-visible{outline:2px solid #366af2;outline-offset:-2px}
.case-title{font-size:13px;font-weight:750;letter-spacing:-.01em}
.case-chevron{margin-left:auto;font-size:18px;transition:transform .15s}.case-panel[open] .case-chevron{transform:rotate(180deg)}
.case-badge{display:inline-flex;align-items:center;font-size:11px;font-weight:700;line-height:1.4;padding:4px 9px;border-radius:20px;border:1px solid #e1e8f4;background:#f0f4fa;color:#5d7394}
.case-badge.priority-high{color:#956717;background:#fff9e8;border-color:#f8e8b9}.case-badge.priority-urgent{color:#be405b;background:#fff0f3;border-color:#f2d2dc}
.case-assigned{color:#7083a2;font-size:12px}
.case-body{padding:16px 20px 20px;max-height:46vh;max-height:46dvh;overflow:auto;scrollbar-width:thin}
.case-help{margin:0 0 12px;color:#7b8fab!important;font-size:12px;line-height:1.55}
.case-tabs{display:flex;gap:6px;margin:0 0 16px;border-bottom:1px solid #e8eef8;padding:0 0 10px}
.case-tabs button{border:1px solid transparent;border-radius:9px;background:transparent!important;color:#657c9f!important;font-size:12px;font-weight:700;padding:7px 11px;cursor:pointer}
.case-tabs button.is-active{color:#2f63df!important;background:#edf3ff!important;border-color:#d8e4ff}.case-tabs span{font-size:10px;padding-left:4px}
.case-client{display:flex;justify-content:space-between;align-items:center;gap:14px;flex-wrap:wrap;background:#f7f9fd;border:1px solid #e6edf7;padding:11px 13px;border-radius:11px;margin-bottom:15px}
.case-client strong{font-size:13px}.case-client span{display:block;color:#7b8fad;font-size:11px;margin-top:3px}.case-client-links{display:flex;gap:10px;flex-wrap:wrap;font-size:12px}
.case-client-links a,.case-purchase a{color:#3267dc!important;text-decoration:none}.case-client-links a:hover{text-decoration:underline}
.case-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px 16px}.case-field{min-width:0;display:flex;flex-direction:column;gap:6px}
.case-field label,.case-label{font-size:12px;font-weight:700;color:#526d93!important;display:block}
.case-section .case-field input,.case-section .case-field select,.case-section textarea{box-sizing:border-box;width:100%!important;min-width:0!important;max-width:100%;border:1px solid #dce6f5!important;border-radius:10px!important;background:#fff!important;color:#284465!important;padding:10px 12px!important;font-size:13px!important;box-shadow:none!important;outline:none;line-height:1.45}
.case-section .case-field input,.case-section .case-field select{height:42px!important}.case-section textarea{resize:vertical;min-height:80px;max-height:180px}.case-section input::placeholder,.case-section textarea::placeholder{color:#97a7bf!important}
.case-section .case-field input:focus,.case-section .case-field select:focus,.case-section textarea:focus{border-color:#88aafb!important;box-shadow:0 0 0 3px #edf3ff!important}
.case-grid+.case-help{margin-top:9px}.case-form-actions{display:flex;justify-content:flex-end;flex-wrap:wrap;gap:8px;margin-top:12px}.case-section .btn{border-radius:10px!important;padding:9px 13px!important;min-height:38px;font-size:12px!important}
.case-take{margin-top:-38px;max-width:50%;width:fit-content}.case-take .btn{color:#416492!important;background:#f6f9ff!important;border:1px solid #dce6f5!important;box-shadow:none!important}
.case-note-list{margin-top:16px;display:grid;gap:10px}.case-note{padding:12px 14px;border:1px solid #e4ecf8;border-radius:11px;background:#fbfcff}.case-note header{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;font-size:11px;color:#8295b1}.case-note strong{color:#536e92}.case-note p{margin:8px 0 0;white-space:normal;overflow-wrap:anywhere;font-size:13px}
.case-timeline{margin:0;padding:0 0 0 14px;border-left:2px solid #e5edfb;list-style:none}.case-timeline li{position:relative;padding:0 0 16px 9px;font-size:12px}.case-timeline li:before{content:'';width:7px;height:7px;position:absolute;top:6px;left:-19px;border:2px solid white;border-radius:50%;background:#85a5e5}.case-timeline strong,.case-timeline span{display:block}.case-timeline span{font-size:11px;color:#8295b1;margin-top:4px}.case-timeline p{margin:5px 0 0;color:#607da2;overflow-wrap:anywhere}
.case-feedback{padding:10px 18px;color:#397751;background:#f2fbf6;font-size:12px;line-height:1.5}.case-feedback.is-error{color:#88652c;background:#fff9ec}.case-refresh{margin:8px 18px}
.case-customer-summary{display:flex;gap:10px;flex-wrap:wrap}.case-purchase{flex:1;min-width:180px;padding:9px 12px;background:#f7faff;border:1px solid #e2ebf8;border-radius:10px;font-size:11px}.case-purchase strong,.case-purchase span{display:block}.case-purchase span{color:#7990ad;margin:3px 0}.case-purchase strong{overflow-wrap:anywhere}
.case-history-nav{display:flex;gap:8px;padding:8px 18px}
.case-dialog{color-scheme:light!important;background:#fff!important;border:1px solid #dce6f7!important;border-radius:20px!important;color:#223d64!important;width:min(480px,calc(100% - 28px));max-height:85dvh;overflow:auto;padding:25px!important;box-shadow:0 24px 90px #152a5444}
.case-dialog::backdrop{background:#16305270;backdrop-filter:blur(3px)}.case-dialog h2{font-size:21px;margin:0 0 10px;color:#1d395e}.case-dialog .case-field{margin:15px 0}.case-dialog-feedback{font-size:12px;color:#927239}.case-section button:disabled{opacity:.55;cursor:wait}
@media(max-width:1000px){.case-body{max-height:42dvh}.exbot-desk-ui .case-actions{gap:6px}.case-panel>summary{padding:12px 14px}.case-body{padding:14px}}
@media(max-width:580px){.case-grid{grid-template-columns:1fr}.case-tabs{gap:3px}.case-actions{width:100%}.exbot-desk-ui .case-actions .btn{padding:8px 9px!important;font-size:11px!important}.case-assigned{display:none}.case-body{max-height:40dvh}.case-take{max-width:100%;margin-top:9px}.case-form-actions{justify-content:stretch}.case-form-actions button{flex:1}.case-dialog{padding:19px!important}}
/* One mobile header offset; keep the reply composer on screen when the case is open. */
@media(max-width:760px){
 body.exbot-desk-ui.has-platform-sidebar>.wrap{height:calc(100dvh - 56px)!important;min-height:0!important;padding:8px!important}
 body.exbot-desk-ui.desk-operator-only>.wrap{height:100dvh!important;min-height:0!important;padding:8px!important}
 body.exbot-desk-ui .shell{height:100%!important;min-height:0!important;flex:1;overflow:hidden}
 body.exbot-desk-ui .head .case-actions{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));width:100%;gap:6px}
 body.exbot-desk-ui .head .case-actions form{min-width:0}
 body.exbot-desk-ui .head .case-actions .btn{width:100%!important;min-height:36px!important;padding:4px!important;white-space:normal;font-size:10px!important;line-height:1.2}
 body.exbot-desk-ui .head{gap:9px!important}
 .case-body{max-height:min(34dvh,max(120px,calc(100dvh - 470px)))}
 body.exbot-desk-ui .composer{flex:0 0 auto!important}
 body.exbot-desk-ui .messages{min-height:45px!important}
 body.exbot-desk-ui .case-feedback{padding:6px 12px}
}
