/* Ticket View final pass. Loaded LAST so shared Service Desk styles cannot override it. */

/* Crisp-style day delineation is shared by Ticket View, Desk View, and mobile. */
.ticket-controls-heading{display:none}
.message-day-separator{display:flex;align-items:center;gap:10px;margin:14px 2px 10px;color:#7a8999;font-size:10.5px;font-weight:700;line-height:1;white-space:nowrap}
.message-day-separator:before,.message-day-separator:after{content:"";height:1px;flex:1 1 auto;background:#dfe6ed}
.message-day-separator span{flex:0 0 auto;padding:0 4px}
body.conversation-split-dragging,body.conversation-split-dragging *{cursor:row-resize!important;user-select:none!important}
.copyable-value{cursor:copy}
.record-ticket-utility-row{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0}
.record-ticket-utility-actions{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.record-ticket-utility-actions .secondary-button{margin:0}

@media (min-width:980px){
  /* OUTER SPLIT: queue | selected ticket. */
  body.service-desk-desk-view .desk-simple-view{grid-template-columns:minmax(235px,var(--desk-queue-width,25%)) minmax(0,1fr)!important}
  body.service-desk-desk-view .desk-column-resizer{display:block!important;position:absolute!important;top:0!important;bottom:0!important;right:-6px!important;width:12px!important;z-index:40!important;cursor:col-resize!important;touch-action:none!important}
  body.service-desk-desk-view .desk-column-resizer:after{content:""!important;position:absolute!important;left:5px!important;top:0!important;bottom:0!important;width:2px!important;background:#bdcbd8!important}
  body.service-desk-desk-view .desk-column-resizer:before{content:""!important;position:absolute!important;left:2px!important;top:50%!important;transform:translateY(-50%)!important;width:8px!important;height:46px!important;border-radius:999px!important;background:#9fb1c1!important;border:2px solid #fff!important;box-sizing:border-box!important}
  body.service-desk-desk-view .desk-column-resizer:hover:before{background:#4f91c8!important}

  /* INNER SPLIT: conversation | player/certificate context. */
  body.full-case-mode.desk-embedded .record-workspace{--desk-thread-width:75%;grid-template-columns:minmax(0,var(--desk-thread-width)) minmax(205px,1fr)!important;gap:12px!important;position:relative!important;height:100%!important;min-height:0!important;overflow:hidden!important;transition:grid-template-columns .2s ease!important}
  body.full-case-mode.desk-embedded.ticket-rail-open .record-workspace{--desk-thread-width:66.6667%}
  body.full-case-mode.desk-embedded .record-work{grid-column:1!important;grid-row:1!important;min-width:0!important;height:100%!important;overflow:hidden!important;padding:0!important}
  body.full-case-mode.desk-embedded .record-context{grid-column:2!important;grid-row:1!important;min-width:0!important;height:100%!important;overflow-y:auto!important;overflow-x:hidden!important;padding:0 2px 10px 10px!important;border-left:1px solid #dce4ec!important;gap:9px!important}
  body.desk-embedded .desk-context-resizer{display:block!important;position:absolute!important;top:0!important;bottom:0!important;left:calc(var(--desk-thread-width) - 6px)!important;width:12px!important;z-index:50!important;cursor:col-resize!important;touch-action:none!important}
  body.desk-embedded .desk-context-resizer:after{content:""!important;position:absolute!important;left:5px!important;top:0!important;bottom:0!important;width:2px!important;background:#bdcbd8!important}
  body.desk-embedded .desk-context-resizer:before{content:""!important;position:absolute!important;left:2px!important;top:50%!important;transform:translateY(-50%)!important;width:8px!important;height:46px!important;border-radius:999px!important;background:#9fb1c1!important;border:2px solid #fff!important;box-sizing:border-box!important}
  body.desk-embedded .desk-context-resizer:hover:before{background:#4f91c8!important}

  /* RIGHT CONTEXT: compact, readable, and never allowed to hang outside its column. */
  body.desk-embedded .record-context .record-topbar{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:8px!important;margin:0!important;padding:0!important;background:transparent!important;border:0!important;box-shadow:none!important;min-width:0!important}
  body.desk-embedded .record-context .record-ticket-identity{padding:2px 4px!important;margin:0!important;font-size:11px!important;line-height:1.25!important;white-space:nowrap!important}
  body.desk-embedded .record-context .conversation-hard-status-row{display:grid!important;grid-template-columns:minmax(0,1fr) 92px!important;align-items:center!important;gap:8px!important;width:100%!important;min-width:0!important;margin:0!important;padding:8px 9px!important;border:1px solid #dce5ee!important;border-radius:8px!important;background:#fff!important;box-sizing:border-box!important;overflow:visible!important}
  body.desk-embedded .record-context .conversation-hard-status-copy{display:block!important;min-width:0!important}
  body.desk-embedded .record-context .conversation-hard-status-copy .record-kicker{display:block!important;font-size:10.5px!important;line-height:1.2!important;font-weight:750!important;color:#526679!important;white-space:nowrap!important}
  body.desk-embedded .record-context .conversation-factual-state-meta{display:none!important}
  body.desk-embedded .record-context .case-state-control{display:block!important;width:92px!important;min-width:92px!important;max-width:92px!important;margin:0!important;position:relative!important}
  body.desk-embedded .record-context .conversation-state-button{display:flex!important;align-items:center!important;justify-content:center!important;width:92px!important;max-width:92px!important;min-width:92px!important;min-height:30px!important;height:30px!important;padding:4px 7px!important;font-size:10px!important;line-height:1!important;font-weight:750!important;gap:4px!important;border-radius:7px!important;box-sizing:border-box!important;overflow:hidden!important;white-space:nowrap!important}
  body.desk-embedded .record-context .conversation-state-button span:nth-child(2){min-width:0!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
  body.desk-embedded .record-context .case-state-popover{right:0!important;left:auto!important;width:170px!important;max-width:min(170px,calc(100vw - 24px))!important;z-index:80!important}

  /* Actions: Follow Up gets enough room for date + Overdue. Resolve and More stay contained below. */
  body.desk-embedded .record-context .case-toolbar{display:grid!important;grid-template-columns:minmax(0,1fr) 36px!important;gap:6px!important;width:100%!important;margin:0!important;padding:7px!important;border:1px solid #dce5ee!important;border-radius:8px!important;background:#fff!important;box-sizing:border-box!important;overflow:visible!important}
  body.desk-embedded .record-context .case-toolbar .top-followup-control{grid-column:1 / -1!important;width:100%!important;min-width:0!important;max-width:none!important;min-height:38px!important;padding:6px 8px!important;display:flex!important;align-items:center!important;justify-content:center!important;gap:7px!important;font-size:10.5px!important;line-height:1.1!important;box-sizing:border-box!important;overflow:hidden!important}
  body.desk-embedded .record-context .case-toolbar .top-followup-label{font-size:10.5px!important;font-weight:800!important;line-height:1.1!important;white-space:nowrap!important}
  body.desk-embedded .record-context .case-toolbar .top-followup-meta{display:flex!important;align-items:center!important;justify-content:center!important;gap:5px!important;min-width:0!important;line-height:1!important}
  body.desk-embedded .record-context .case-toolbar .top-followup-date{padding:0!important;font-size:9.5px!important;font-weight:700!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
  body.desk-embedded .record-context .case-toolbar .top-followup-overdue{margin:0!important;padding:2px 5px!important;font-size:8px!important;line-height:1.05!important;white-space:nowrap!important}
  body.desk-embedded .record-context .case-toolbar .resolve-conversation-button,
  body.desk-embedded .record-context .case-toolbar .reopen-conversation-button{grid-column:1!important;width:100%!important;min-width:0!important;max-width:none!important;min-height:34px!important;padding:6px 8px!important;font-size:10.5px!important;line-height:1.1!important;box-sizing:border-box!important}
  body.desk-embedded .record-context .case-toolbar .case-more-menu{grid-column:2!important;width:36px!important;min-width:36px!important;max-width:36px!important;margin:0!important}
  body.desk-embedded .record-context .case-toolbar .case-more-trigger{width:36px!important;min-width:36px!important;max-width:36px!important;height:34px!important;min-height:34px!important;padding:0!important;display:grid!important;place-items:center!important;box-sizing:border-box!important}

  /* Context cards use one typography scale. */
  body.desk-embedded .record-context .context-card{padding:0!important;overflow:hidden!important}
  body.desk-embedded .record-context .context-summary{padding:9px 10px!important;font-size:11.5px!important;line-height:1.25!important;font-weight:750!important}
  body.desk-embedded .record-context .context-card-body{padding:9px 10px!important}
  body.desk-embedded .record-context .context-card .secondary-button{font-size:10.5px!important;min-height:32px!important;padding:6px 8px!important}
  body.desk-embedded .record-context [data-record-section="current-certificate"] .info-list{gap:8px!important}
  body.desk-embedded .record-context [data-record-section="current-certificate"] .info-item label{font-size:9.5px!important;line-height:1.2!important;font-weight:700!important}
  body.desk-embedded .record-context [data-record-section="current-certificate"] .info-item strong,
  body.desk-embedded .record-context [data-record-section="current-certificate"] .info-item strong .dim{font-size:10.5px!important;line-height:1.3!important;font-weight:600!important;overflow-wrap:anywhere!important;word-break:normal!important}

  /* CENTER: true vertical split. The thread and composer share the available height. */
  body.desk-embedded .record-conversation{height:100%!important;min-height:0!important;display:flex!important;flex-direction:column!important;overflow:hidden!important;box-sizing:border-box!important}
  body.desk-embedded .record-conversation>.conversation-heading{flex:0 0 auto!important}
  body.desk-embedded .history-conversation{height:auto!important;flex:1 1 0!important;min-height:0!important;display:flex!important;flex-direction:column!important;overflow:hidden!important;border-radius:8px!important}
  body.desk-embedded .history-conversation .message-thread{flex:1 1 0!important;min-height:115px!important;overflow-y:auto!important;overflow-x:hidden!important;padding-bottom:10px!important}
  body.desk-embedded .conversation-composer-resizer{display:block!important;position:relative!important;flex:0 0 18px!important;height:18px!important;min-height:18px!important;cursor:row-resize!important;background:#f8fafc!important;border-top:1px solid #dce5ed!important;border-bottom:1px solid #dce5ed!important;touch-action:none!important;user-select:none!important;z-index:20!important}
  body.desk-embedded .conversation-composer-resizer span{position:absolute!important;left:50%!important;top:50%!important;width:72px!important;height:5px!important;transform:translate(-50%,-50%)!important;border-radius:999px!important;background:#9fb1c1!important;pointer-events:none!important}
  body.desk-embedded .conversation-composer-resizer:hover span,body.desk-embedded .conversation-composer-resizer.is-dragging span{width:90px!important;background:#4f91c8!important}

  /* Composer is a true bottom-docked writing pane. The message editor absorbs the
     available height; formatting stays directly below it; sending controls sit at
     the physical bottom with equal padding on both sides. */
  body.desk-embedded .inline-reply{display:flex!important;flex-direction:column!important;flex:0 0 auto!important;height:auto;min-height:200px!important;max-height:none!important;overflow:hidden!important;padding:8px 10px 10px!important;background:#fff!important;box-sizing:border-box!important;position:relative!important}
  body.desk-embedded .inline-reply>.mobile-compose-header{display:none!important}
  body.desk-embedded .inline-delivery-panel,body.desk-embedded .inline-ai-assistant{flex:0 0 auto!important;min-width:0!important}
  body.desk-embedded .inline-reply-text-wrap{display:flex!important;flex-direction:column!important;flex:1 1 0!important;min-width:0!important;min-height:0!important;overflow:hidden!important;overscroll-behavior:contain!important}
  body.desk-embedded .inline-message-editor-shell{display:flex!important;flex:1 1 0!important;min-height:96px!important;height:auto!important;margin-top:6px!important;overflow:hidden!important}
  body.desk-embedded #inlineReplyText{display:block!important;flex:1 1 auto!important;width:100%!important;min-height:96px!important;height:auto!important;max-height:none!important;padding:10px 11px!important;overflow-y:auto!important;font-size:14px!important;line-height:1.5!important;box-sizing:border-box!important}
  body.desk-embedded .history-conversation .bubble-message,body.full-case-mode.desk-embedded .history-conversation .bubble-message{font-size:14px!important;line-height:1.5!important}
  body.desk-embedded #inlineMessageEditorChrome{display:flex!important;flex:0 0 auto!important;min-height:38px!important;margin:0!important;padding:4px 2px 5px!important;border-top:1px solid #edf1f5!important;overflow:visible!important}
  body.desk-embedded .message-format-toolbar{display:flex!important;align-items:center!important;gap:6px!important;min-width:0!important}
  body.desk-embedded .inline-ai-manual-tools{align-items:center!important;gap:6px!important}
  body.desk-embedded .inline-ai-manual-tools .inline-ai-secondary,body.desk-embedded .message-format-select,body.desk-embedded .message-format-toolbar button,body.desk-embedded .message-editor-icon-button{height:35px!important;min-height:35px!important;box-sizing:border-box!important;border-radius:7px!important}
  body.desk-embedded .message-format-select{width:58px!important;min-width:58px!important;max-width:58px!important;padding:4px 22px 4px 8px!important}
  body.desk-embedded .message-emoji-wrap{position:relative!important}
  body.desk-embedded .inline-reply-footer{position:relative!important;left:auto!important;right:auto!important;bottom:auto!important;z-index:30!important;flex:0 0 auto!important;margin:0!important;padding:8px 2px 0!important;border-top:1px solid #dfe6ed!important;background:#fff!important;box-shadow:none!important;overflow:visible!important}
  body.desk-embedded .inline-footer-row{display:flex!important;align-items:center!important;gap:8px!important;width:100%!important;min-width:0!important;flex-wrap:nowrap!important;padding:0 2px!important;box-sizing:border-box!important}
  body.desk-embedded .inline-footer-row .inline-send-timing{display:flex!important;align-items:center!important;flex:0 0 auto!important;min-width:0!important;margin:0!important}
  body.desk-embedded .inline-footer-row .inline-send-choice{min-height:32px!important;padding:5px 10px!important;font-size:10.5px!important;white-space:nowrap!important}
  body.desk-embedded .inline-footer-row .inline-sender-label{display:flex!important;align-items:center!important;gap:6px!important;flex:0 0 auto!important;min-width:0!important;margin:0!important;font-size:10.5px!important}
  body.desk-embedded .inline-footer-row .inline-sender-label span{font-size:10.5px!important;font-weight:650!important;white-space:nowrap!important}
  body.desk-embedded .inline-footer-row .inline-sender-label select{width:118px!important;min-width:118px!important;max-width:118px!important;min-height:32px!important;padding:5px 25px 5px 8px!important;font-size:10.5px!important}
  body.desk-embedded .inline-footer-row .inline-reply-warning{flex:1 1 auto!important;min-width:0!important;font-size:9.5px!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
  body.desk-embedded .inline-footer-row .inline-reply-actions{display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:7px!important;margin:0 0 0 auto!important;min-width:0!important;flex:0 0 auto!important;position:static!important;padding-right:2px!important}
  body.desk-embedded .inline-footer-row .inline-draft-actions{display:flex!important;align-items:center!important;gap:6px!important;margin:0!important}
  body.desk-embedded .inline-footer-row .inline-reply-actions button{min-height:32px!important;padding:5px 10px!important;font-size:10.5px!important;white-space:nowrap!important}

  /* Ticket list is a real optional first column. When closed it disappears
     completely; there is no intermediary gutter, toolbar, or vertical rail. */
  body.service-desk-desk-view .desk-simple-view{grid-template-columns:minmax(0,var(--desk-queue-width,25%)) minmax(0,1fr)!important;transition:grid-template-columns .2s ease!important}
  body.service-desk-desk-view .desk-simple-view.queue-collapsed{grid-template-columns:0 minmax(0,1fr)!important}
  body.service-desk-desk-view .desk-simple-view.queue-collapsed .desk-queue-pane,
  body.service-desk-desk-view .desk-simple-view.queue-collapsed .desk-column-resizer{display:none!important}
  body.service-desk-desk-view .desk-ticket-pane{grid-column:2!important;position:relative!important;min-width:0!important;transition:min-width .2s ease!important}

  /* Keep the existing ticket-list filters, but remove the old rail toggle from
     that toolbar because show/hide now belongs in the ticket header. */
  body.service-desk-desk-view .desk-queue-toolbar{grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;align-items:center!important}
  body.service-desk-desk-view .desk-queue-toolbar #deskSearch{grid-column:1 / -1!important}
  body.service-desk-desk-view .desk-queue-toolbar-toggle{display:none!important}

  /* One compact shell control, in the existing Message History header beside X. */
  body.desk-embedded .ticket-list-header-expand{display:inline-flex!important;align-items:center!important;justify-content:center!important;width:28px!important;height:28px!important;min-width:28px!important;margin-left:auto!important;padding:0!important;border:1px solid #d5dde5!important;border-radius:7px!important;background:#fff!important;color:#697786!important;font-size:19px!important;font-weight:500!important;line-height:1!important;cursor:pointer!important;box-shadow:none!important}
  body.desk-embedded .ticket-list-header-expand:hover{background:#f4f7f9!important;border-color:#bfcbd6!important;color:#33495d!important}
  body.desk-embedded .ticket-list-header-expand + .ticket-exit-button{margin-left:0!important}
}

@media (min-width:980px){
  /* Specificity guard: legacy full-case rules are intentionally strong, so keep
     the final composer contract at the same specificity and later in the cascade. */
  body.full-case-mode.desk-embedded .inline-reply{display:flex!important;flex-direction:column!important;height:auto;min-height:200px!important;max-height:none!important;overflow:hidden!important;padding:8px 10px 10px!important}
  body.full-case-mode.desk-embedded .inline-reply-text-wrap{display:flex!important;flex-direction:column!important;flex:1 1 0!important;min-height:0!important;overflow:hidden!important}
  body.full-case-mode.desk-embedded .inline-message-editor-shell{display:flex!important;flex:1 1 0!important;min-height:96px!important;height:auto!important;margin-top:6px!important;overflow:hidden!important}
  body.full-case-mode.desk-embedded #inlineReplyText{display:block!important;flex:1 1 auto!important;width:100%!important;height:auto!important;min-height:96px!important;max-height:none!important;padding:10px 11px!important;overflow-y:auto!important}
  body.full-case-mode.desk-embedded #inlineMessageEditorChrome{display:flex!important;flex:0 0 auto!important;min-height:38px!important;margin:0!important;padding:4px 2px 5px!important;border-top:1px solid #edf1f5!important;overflow:visible!important}
  body.full-case-mode.desk-embedded .inline-reply-footer{position:relative!important;left:auto!important;right:auto!important;bottom:auto!important;flex:0 0 auto!important;margin:0!important;padding:8px 2px 0!important;border-top:1px solid #dfe6ed!important;background:#fff!important;box-shadow:none!important;overflow:visible!important}
  body.full-case-mode.desk-embedded .inline-footer-row{display:flex!important;grid-template-columns:none!important;grid-template-rows:none!important;grid-template-areas:none!important;align-items:center!important;gap:8px!important;width:100%!important;min-width:0!important;flex-wrap:nowrap!important;padding:0 2px!important;box-sizing:border-box!important}
  body.full-case-mode.desk-embedded .inline-footer-row .inline-send-timing{display:flex!important;grid-column:auto!important;grid-row:auto!important;align-items:center!important;flex:0 0 auto!important;width:auto!important;min-width:0!important;margin:0!important}
  body.full-case-mode.desk-embedded .inline-footer-row .inline-sender-label{display:flex!important;grid-column:auto!important;grid-row:auto!important;align-items:center!important;gap:6px!important;flex:0 0 auto!important;width:auto!important;min-width:0!important;margin:0!important}
  body.full-case-mode.desk-embedded .inline-footer-row .inline-sender-label select{width:118px!important;min-width:118px!important;max-width:118px!important;min-height:32px!important;padding:5px 25px 5px 8px!important;font-size:10.5px!important}
  body.full-case-mode.desk-embedded .inline-footer-row .inline-reply-actions{display:flex!important;grid-column:auto!important;grid-row:auto!important;align-items:center!important;justify-content:flex-end!important;gap:7px!important;width:auto!important;min-width:0!important;margin:0 0 0 auto!important;padding-right:2px!important}
  body.full-case-mode.desk-embedded .inline-footer-row .inline-draft-actions{display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:6px!important;min-width:0!important;margin:0!important}
  body.full-case-mode.desk-embedded .inline-footer-row .inline-reply-actions button{min-height:32px!important;padding:5px 10px!important;font-size:10.5px!important;white-space:nowrap!important}
}

/* Keep the desktop navigation's vertical rhythm identical whether the rail is
   expanded or collapsed. Only width changes; Service Desk and the other nav items
   stay on the same horizontal line. */
@media (min-width:701px){
  .sidebar{transition:width .2s ease,flex-basis .2s ease!important}
  .main-content{transition:margin-left .2s ease,width .2s ease!important}
  .sidebar .brand{height:64px!important;min-height:64px!important;flex:0 0 64px!important;padding:6px 12px!important;align-items:flex-start!important;justify-content:center!important;box-sizing:border-box!important}
  .sidebar .brand img{display:block;width:82px!important;max-height:48px!important;object-fit:contain!important}
  .desktop-sidebar-toggle{top:17px!important;transition:right .2s ease,background .15s ease,color .15s ease!important}
  body.sidebar-collapsed .sidebar .brand{height:64px!important;min-height:64px!important;flex-basis:64px!important;padding:6px!important}
  body.sidebar-collapsed .desktop-sidebar-toggle{top:17px!important}
}

/* 2026-08-30 final ticket-context cleanup. Restore the operational controls that
   belong to the ticket, keep Player as a separate collapsible card, and make the
   optional ticket rail feel like a matching inset panel rather than a new page. */
@media (min-width:980px){
  /* THREE-COLUMN BALANCE: the outer workspace stays the same pale-blue canvas.
     The optional ticket list is an inset white panel, matching the right-side
     cards, so revealing it does not visually replace the page architecture. */
  body.service-desk-desk-view .desk-simple-view{background:#f5f7fa!important}
  body.service-desk-desk-view .desk-queue-pane{height:auto!important;min-height:0!important;margin:10px 8px 10px 10px!important;border:1px solid #dce5ee!important;border-radius:8px!important;background:#fff!important;box-shadow:none!important;overflow:visible!important}
  body.service-desk-desk-view .desk-queue-toolbar{border-radius:8px 8px 0 0!important;background:#fff!important}
  body.service-desk-desk-view .desk-queue-list{border-radius:0 0 8px 8px!important;background:#fff!important;overflow-y:auto!important;overflow-x:hidden!important}
  body.service-desk-desk-view .desk-simple-view.queue-collapsed .desk-queue-pane{margin:10px 4px!important;border:1px solid #dce5ee!important;border-radius:8px!important;background:#fff!important;overflow:hidden!important}

  /* TICKET CARD: factual status, AI guidance, next action, and direct actions are
     operational ticket information. Keep them together above Player. */
  body.full-case-mode.desk-embedded .record-context{gap:9px!important}
  body.full-case-mode.desk-embedded .record-context .record-left-operations{display:flex!important;flex-direction:column!important;gap:8px!important;min-width:0!important}
  body.full-case-mode.desk-embedded .record-context .record-topbar{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:0!important;width:100%!important;margin:0!important;padding:0!important;border:1px solid #dce5ee!important;border-radius:8px!important;background:#fff!important;box-shadow:none!important;overflow:visible!important}
  body.full-case-mode.desk-embedded .record-context .ticket-controls-heading{display:flex!important;align-items:center!important;justify-content:flex-start!important;gap:9px!important;min-height:40px!important;padding:8px 10px!important;border-bottom:1px solid #e7edf3!important;color:#2b4055!important;background:#fff!important;border-radius:8px 8px 0 0!important;box-sizing:border-box!important;overflow:visible!important}
  body.full-case-mode.desk-embedded .record-context .ticket-controls-heading strong{flex:0 0 auto!important;font-size:11px!important;font-weight:800!important;line-height:1.2!important;white-space:nowrap!important}
  body.full-case-mode.desk-embedded .record-context .ticket-controls-heading .case-state-control{position:relative!important;display:block!important;width:auto!important;min-width:0!important;max-width:none!important;margin:0!important;padding:0!important}
  body.full-case-mode.desk-embedded .record-context .ticket-controls-heading #caseStateBtn{display:grid!important;grid-template-columns:7px minmax(0,1fr) 10px!important;align-items:center!important;gap:5px!important;width:auto!important;min-width:92px!important;max-width:116px!important;height:32px!important;min-height:32px!important;padding:5px 8px!important;border:1px solid #cbd7e3!important;border-radius:7px!important;background:#fff!important;color:#334b62!important;font-size:10.5px!important;font-weight:750!important;line-height:1!important;box-sizing:border-box!important;overflow:hidden!important;white-space:nowrap!important;box-shadow:none!important}
  body.full-case-mode.desk-embedded .record-context .ticket-controls-heading #caseStateBtn:hover{border-color:#8fb5d6!important;background:#f7fbff!important;color:#176db7!important}
  body.full-case-mode.desk-embedded .record-context .ticket-controls-heading #caseStateBtn .conversation-state-dot{width:7px!important;height:7px!important}
  body.full-case-mode.desk-embedded .record-context .ticket-controls-heading #caseStateBtn span:nth-child(2){min-width:0!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
  body.full-case-mode.desk-embedded .record-context .ticket-controls-heading .case-state-popover{left:0!important;right:auto!important;width:170px!important;max-width:min(170px,calc(100vw - 24px))!important;z-index:100!important}
  body.full-case-mode.desk-embedded .record-context .ticket-controls-heading .conversation-state-button.conversation-state-unresolved,
  body.full-case-mode.desk-embedded .record-context .ticket-controls-heading .conversation-state-button.conversation-state-pending,
  body.full-case-mode.desk-embedded .record-context .ticket-controls-heading .conversation-state-button.conversation-state-new_conversation,
  body.full-case-mode.desk-embedded .record-context .ticket-controls-heading .conversation-state-button.conversation-state-new_reply,
  body.full-case-mode.desk-embedded .record-context .ticket-controls-heading .conversation-state-button.conversation-state-resolved{background:#fff!important;border-color:#cbd7e3!important;color:#334b62!important}
  body.full-case-mode.desk-embedded .record-context .record-ticket-identity{display:none!important}

  body.full-case-mode.desk-embedded .record-context [data-record-section="conversation-details"]{display:block!important;width:100%!important;margin:0!important;padding:0!important;border:0!important;border-bottom:1px solid #e7edf3!important;border-radius:0!important;background:#fff!important;box-shadow:none!important;overflow:visible!important}
  body.full-case-mode.desk-embedded .record-context [data-record-section="conversation-details"]>summary{pointer-events:auto!important;cursor:pointer!important;min-height:38px!important;padding:8px 10px!important;background:#fff!important;font-size:11px!important;font-weight:800!important;color:#33495e!important}
  body.full-case-mode.desk-embedded .record-context [data-record-section="conversation-details"]>summary:hover{background:#f8fafc!important}
  body.full-case-mode.desk-embedded .record-context .record-details-body{padding:0!important}
  body.full-case-mode.desk-embedded .record-context .record-details-primary>.record-status-item{padding:9px 10px!important;gap:5px!important}
  body.full-case-mode.desk-embedded .record-context .record-details-primary .record-kicker{font-size:9.5px!important;letter-spacing:.02em!important}
  body.full-case-mode.desk-embedded .record-context .record-status-assessment>.record-kicker,
  body.full-case-mode.desk-embedded .record-context .record-status-workflow-assessment>.record-kicker{font-weight:850!important;color:#40556a!important}
  body.full-case-mode.desk-embedded .record-context .record-details-primary .booking-opportunity-badge{padding:7px 8px!important;font-size:10.5px!important;line-height:1.25!important;border-radius:7px!important}
  body.full-case-mode.desk-embedded .record-context .record-details-primary .booking-opportunity-badge small{font-size:9.5px!important;line-height:1.3!important}
  body.full-case-mode.desk-embedded .record-context .record-details-primary .record-opportunity-override{min-height:32px!important;padding:5px 28px 5px 8px!important;font-size:10px!important}
  body.full-case-mode.desk-embedded .record-context .record-details-primary .stage-badge{padding:5px 8px!important;font-size:10.5px!important;line-height:1.2!important}
  body.full-case-mode.desk-embedded .record-context .record-details-primary .record-next-action-text{font-size:10.5px!important;line-height:1.4!important}
  body.full-case-mode.desk-embedded .record-context .record-details-primary .record-next-action-source{font-size:9px!important;line-height:1.3!important}
  body.full-case-mode.desk-embedded .record-context .record-details-meta-grid{display:none!important}
  body.full-case-mode.desk-embedded .record-context .ticket-ai-actions{display:flex!important;justify-content:flex-end!important;padding:7px 10px 9px!important;border-top:1px solid #edf1f5!important}
  body.full-case-mode.desk-embedded .record-context .ticket-ai-refresh{appearance:none!important;border:0!important;background:transparent!important;padding:3px 0!important;color:#47708f!important;font:inherit!important;font-size:9.5px!important;font-weight:750!important;cursor:pointer!important}
  body.full-case-mode.desk-embedded .record-context .ticket-ai-refresh:hover{text-decoration:underline!important;color:#176db7!important}
  body.full-case-mode.desk-embedded .record-context .ticket-ai-refresh:disabled{opacity:.55!important;cursor:wait!important;text-decoration:none!important}

  body.full-case-mode.desk-embedded .record-context .record-topbar .case-toolbar{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr) 36px!important;gap:7px!important;width:100%!important;margin:0!important;padding:8px 10px 9px!important;border:0!important;border-radius:0 0 8px 8px!important;background:#fff!important;box-sizing:border-box!important;overflow:visible!important}
  body.full-case-mode.desk-embedded .record-context .record-topbar .case-toolbar .top-followup-control{grid-column:1!important;min-height:34px!important;padding:5px 7px!important;font-size:10.5px!important}
  body.full-case-mode.desk-embedded .record-context .record-topbar .case-toolbar .resolve-conversation-button,
  body.full-case-mode.desk-embedded .record-context .record-topbar .case-toolbar .reopen-conversation-button{grid-column:2!important;min-height:34px!important;padding:5px 7px!important;font-size:10.5px!important}
  body.full-case-mode.desk-embedded .record-context .record-topbar .case-toolbar .case-more-menu{grid-column:3!important;width:36px!important;min-width:36px!important}
  body.full-case-mode.desk-embedded .record-context .record-topbar .case-toolbar .case-more-trigger{width:36px!important;min-width:36px!important;height:34px!important;min-height:34px!important}

  /* PLAYER stays a sibling card and its existing chevron is now a real control. */
  body.full-case-mode.desk-embedded .record-context [data-record-section="player"]{display:block!important;width:100%!important;margin:0!important;border:1px solid #dce5ee!important;border-radius:8px!important;background:#fff!important;box-shadow:none!important;overflow:hidden!important}
  body.full-case-mode.desk-embedded .record-context [data-record-section="player"]>summary{pointer-events:auto!important;cursor:pointer!important;user-select:none!important}
  body.full-case-mode.desk-embedded .record-context [data-record-section="player"]>summary:hover{background:#f8fafc!important}

  /* Supporting tools remain available without dominating the right rail. */
  body.full-case-mode.desk-embedded .record-context [data-record-section="internal-notes"],
  body.full-case-mode.desk-embedded .record-context [data-record-section="tags"],
  body.full-case-mode.desk-embedded .record-context [data-record-section="conversation-log"],
  body.full-case-mode.desk-embedded .record-context [data-record-section="other-conversations"]:not([hidden]){display:block!important;width:100%!important;margin:0!important;border:1px solid #dce5ee!important;border-radius:8px!important;background:#fff!important;box-shadow:none!important;overflow:hidden!important}
  body.full-case-mode.desk-embedded .record-context .duplicate-record-banner,
  body.full-case-mode.desk-embedded .record-context .merged-record-banner,
  body.full-case-mode.desk-embedded .record-context .internal-notification-banner{display:flex!important}
  body.full-case-mode.desk-embedded .record-context .duplicate-record-banner{gap:10px!important;padding:10px!important}
  body.full-case-mode.desk-embedded .record-context .duplicate-record-banner strong{font-size:11px!important;line-height:1.25!important}
  body.full-case-mode.desk-embedded .record-context .duplicate-record-banner small{font-size:9.5px!important;line-height:1.35!important}
  body.full-case-mode.desk-embedded .record-context .duplicate-record-banner .primary-button{min-height:34px!important;padding:6px 9px!important;border-radius:7px!important;font-size:10.5px!important;font-weight:750!important;white-space:nowrap!important}
}

/* 2026-08-31 ticket-shell cleanup. An open Ticket is the workspace: hide the
   Service Desk submenu, keep only the primary AT Central module header, and do
   not alter any ticket content, typography, card order, composer, or data logic. */
@media(min-width:980px){
  /* The Service Desk submenu belongs to the overview, not to an open ticket. */
  body.service-desk-desk-view > .app-shell > .sidebar{display:none!important}
  body.service-desk-desk-view > .app-shell > .main-content{width:100%!important;margin-left:0!important}

  /* The three-column workspace is a flat application surface, not another card. */
  body.service-desk-desk-view #workView.active{padding:8px!important}
  body.service-desk-desk-view .desk-simple-view{margin:0!important;border:0!important;border-radius:0!important;box-shadow:none!important;background:#fff!important}
  body.service-desk-desk-view .desk-queue-pane{height:auto!important;min-height:0!important;margin:0!important;border:0!important;border-right:1px solid #dce5ee!important;border-radius:0!important;background:#fff!important;box-shadow:none!important;overflow:hidden!important}
  body.service-desk-desk-view .desk-queue-toolbar,
  body.service-desk-desk-view .desk-queue-list{border-radius:0!important}

  /* The embedded ticket keeps its proven content/layout and loses only duplicate chrome. */
  body.full-case-mode.desk-embedded .full-case-service-nav,
  body.full-case-mode.desk-embedded .drawer-header{display:none!important}
  body.full-case-mode.desk-embedded .drawer-content{width:100%!important;max-width:none!important;height:100%!important;min-height:0!important;padding:0!important;margin:0!important;background:#fff!important}
  body.full-case-mode.desk-embedded .record-workspace{width:100%!important;height:100%!important;min-height:0!important;margin:0!important;border:0!important;border-radius:0!important;box-shadow:none!important;background:#fff!important}
  body.service-desk-desk-view .desk-ticket-pane,
  body.service-desk-desk-view .desk-ticket-frame{background:#fff!important}

  /* Give the existing Message History header a real shell bar and align its title
     with the conversation content below. Font sizes and text remain unchanged. */
  body.full-case-mode.desk-embedded .record-conversation>.conversation-heading{min-height:42px!important;margin:0!important;padding:6px 10px 6px 12px!important;border-bottom:1px solid #e4e9ef!important;background:#fff!important;box-sizing:border-box!important}

  /* Micro-alignment only: match the left breathing room around the pale-blue
     message surface to the natural grid gap on its right. Keep the header/title
     exactly where it is. */
  body.full-case-mode.desk-embedded .history-conversation{margin-left:12px!important}

  /* The first card is also the top edge of the right column. Square only its top
     corners so all three desktop columns begin on the same visual line. */
  body.full-case-mode.desk-embedded .record-context [data-record-section="player"]{border-radius:0 0 8px 8px!important}
}

/* 2026-08-30: factual status is a sibling information card; follow-up moved to composer actions. */
@media(min-width:701px){
  body.full-case-mode.desk-embedded .record-context .record-topbar{
    display:flex!important;
    flex-direction:column!important;
    align-items:stretch!important;
    gap:9px!important;
    width:100%!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    border-radius:0!important;
    background:transparent!important;
    box-shadow:none!important;
    overflow:visible!important;
  }
  body.full-case-mode.desk-embedded .record-context .ticket-controls-heading{
    display:flex!important;
    flex-direction:column!important;
    align-items:stretch!important;
    justify-content:flex-start!important;
    gap:8px!important;
    min-height:0!important;
    margin:0!important;
    padding:10px 11px 11px!important;
    border:1px solid #dce5ee!important;
    border-radius:8px!important;
    background:#fff!important;
    box-shadow:none!important;
    box-sizing:border-box!important;
  }
  body.full-case-mode.desk-embedded .record-context .ticket-controls-heading>strong{
    display:block!important;
    flex:0 0 auto!important;
    margin:0!important;
    color:#344554!important;
    font-size:14px!important;
    font-weight:650!important;
    line-height:1.25!important;
    text-align:left!important;
    white-space:normal!important;
  }
  body.full-case-mode.desk-embedded .record-context .conversation-state-segmented{
    display:grid!important;
    grid-template-columns:minmax(0,.9fr) minmax(0,1.35fr) minmax(0,.9fr)!important;
    gap:6px!important;
    width:100%!important;
  }
  body.full-case-mode.desk-embedded .record-context .conversation-state-choice{
    min-height:31px!important;
    padding:5px 7px!important;
    border-radius:7px!important;
    font-size:10px!important;
    font-weight:750!important;
  }
  body.full-case-mode.desk-embedded .record-context [data-record-section="conversation-details"]{
    display:block!important;
    width:100%!important;
    margin:0!important;
    padding:0!important;
    border:1px solid #dce5ee!important;
    border-radius:8px!important;
    background:#fff!important;
    box-shadow:none!important;
    overflow:hidden!important;
  }
  body.full-case-mode.desk-embedded .record-context [data-record-section="conversation-details"]>summary{
    min-height:42px!important;
    padding:10px 11px!important;
    border:0!important;
    background:#fff!important;
    color:#344554!important;
    font-size:14px!important;
    font-weight:650!important;
    line-height:1.25!important;
    box-sizing:border-box!important;
  }
  body.full-case-mode.desk-embedded .record-context [data-record-section="conversation-details"]>summary:hover{background:#f8fafc!important}
}

body.full-case-mode.desk-embedded .inline-footer-row .inline-send-timing{gap:7px!important}

/* 2026-09-03 AI Assessment visual separation.
   The entire AI area is one soft-blue field. The actual assessment controls remain
   white, status colors stay unchanged, and only the two AI subsections get one
   deliberate separator. Typography is intentionally untouched. */
body.full-case-mode .record-context [data-record-section="conversation-details"],
body.full-case-mode.desk-embedded .record-context [data-record-section="conversation-details"]{
  background:#edf5fd!important;
}
body.full-case-mode .record-context [data-record-section="conversation-details"]>summary,
body.full-case-mode .record-context [data-record-section="conversation-details"]>summary:hover,
body.full-case-mode .record-context [data-record-section="conversation-details"] .record-details-body,
body.full-case-mode.desk-embedded .record-context [data-record-section="conversation-details"]>summary,
body.full-case-mode.desk-embedded .record-context [data-record-section="conversation-details"]>summary:hover,
body.full-case-mode.desk-embedded .record-context [data-record-section="conversation-details"] .record-details-body{
  background:#edf5fd!important;
}
body.full-case-mode .record-context [data-record-section="conversation-details"] .record-details-primary>.record-status-item,
body.full-case-mode.desk-embedded .record-context [data-record-section="conversation-details"] .record-details-primary>.record-status-item{
  background:transparent!important;
}
body.full-case-mode .record-context [data-record-section="conversation-details"] .record-status-assessment,
body.full-case-mode.desk-embedded .record-context [data-record-section="conversation-details"] .record-status-assessment{
  border-bottom:1px solid #d6e5f2!important;
}
body.full-case-mode .record-context [data-record-section="conversation-details"] .record-status-workflow-assessment,
body.full-case-mode.desk-embedded .record-context [data-record-section="conversation-details"] .record-status-workflow-assessment{
  border-bottom:0!important;
}
body.full-case-mode .record-context [data-record-section="conversation-details"] .booking-opportunity-badge,
body.full-case-mode .record-context [data-record-section="conversation-details"] .stage-badge,
body.full-case-mode .record-context [data-record-section="conversation-details"] .record-opportunity-override,
body.full-case-mode.desk-embedded .record-context [data-record-section="conversation-details"] .booking-opportunity-badge,
body.full-case-mode.desk-embedded .record-context [data-record-section="conversation-details"] .stage-badge,
body.full-case-mode.desk-embedded .record-context [data-record-section="conversation-details"] .record-opportunity-override{
  background:#fff!important;
}
body.full-case-mode .record-context [data-record-section="conversation-details"] .record-stage-reason,
body.full-case-mode.desk-embedded .record-context [data-record-section="conversation-details"] .record-stage-reason{
  margin:0!important;
  padding:4px 0 2px!important;
  border-bottom:0!important;
  background:transparent!important;
}
body.full-case-mode .record-context [data-record-section="conversation-details"] .ticket-ai-actions,
body.full-case-mode.desk-embedded .record-context [data-record-section="conversation-details"] .ticket-ai-actions{
  background:#edf5fd!important;
  border-top:0!important;
}
body.full-case-mode.desk-embedded .inline-footer-row .inline-send-timing .inline-send-choice{width:auto!important;min-width:82px!important}
body.full-case-mode.desk-embedded .inline-footer-row .inline-followup-choice{width:auto!important;min-width:82px!important}
body.full-case-mode.desk-embedded .inline-footer-row .inline-followup-choice.has-followup{border-color:#9fc3df!important;background:#f7fbff!important;color:#176db7!important}
body.full-case-mode.desk-embedded .inline-footer-row .inline-followup-choice.is-overdue{border-color:#dca7a7!important;background:#fffafa!important;color:#a63d3d!important}

/* 2026-08-31 Player card micro-spacing: keep the existing Player card content and
   typography, but use the empty upper-right space for Change / Remove so Mobile
   starts on the same visual band instead of being pushed down by a separate row. */
@media(min-width:980px){
  body.full-case-mode.desk-embedded .record-context [data-record-section="player"]>.context-card-body{position:relative!important}
  body.full-case-mode.desk-embedded .record-context [data-record-section="player"] .player-context-actions-only{position:absolute!important;top:10px!important;right:12px!important;z-index:3!important;margin:0!important;padding:0!important;justify-content:flex-end!important}
  body.full-case-mode.desk-embedded .record-context [data-record-section="player"] .player-context-actions-only .player-context-actions{margin:0!important}
  body.full-case-mode.desk-embedded .record-context [data-record-section="player"] .linked-player-record{margin-top:0!important}
  body.full-case-mode.desk-embedded .record-context [data-record-section="player"] .linked-player-identity-list>.info-item:first-child{padding-right:118px!important;box-sizing:border-box!important}
}

/* 2026-09-01 Ticket lifecycle + right-rail stability. The right rail belongs to
   the agent: async Player/related-data hydration must never move its scrollbar. */
body.full-case-mode .record-context{overflow-anchor:none!important;scroll-behavior:auto!important}
body.full-case-mode .record-context .ticket-status-control{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(82px,.72fr)!important;gap:7px!important}
body.full-case-mode .record-context .ticket-status-current{display:flex!important;align-items:center!important;justify-content:flex-start!important;gap:6px!important;cursor:default!important;pointer-events:none!important}
body.full-case-mode .record-context .ticket-status-action{display:flex!important;align-items:center!important;justify-content:center!important;border:1px solid #cbd7e3!important;background:#fff!important;color:#334b62!important;cursor:pointer!important}
body.full-case-mode .record-context .ticket-status-action:hover{border-color:#8fb5d6!important;background:#f7fbff!important;color:#176db7!important}
body.full-case-mode .record-context .ticket-mark-new-button{display:flex!important;align-items:center!important;justify-content:center!important;width:100%!important;min-height:32px!important;margin:0!important;padding:6px 9px!important;border:1px solid #9fc1df!important;border-radius:7px!important;background:#f4f9fd!important;color:#176db7!important;font:inherit!important;font-size:10.5px!important;font-weight:800!important;line-height:1.1!important;cursor:pointer!important;box-shadow:none!important}
body.full-case-mode .record-context .ticket-mark-new-button:hover{border-color:#6fa4d0!important;background:#eaf4fc!important;color:#0f5f9f!important}
body.full-case-mode .record-context .ticket-mark-new-button:disabled{opacity:.6!important;cursor:wait!important}

/* 2026-09-02 Ticket at-a-glance: keep lifecycle controls and utility actions intact,
   and place the same Service Desk visual language between them. */
body.full-case-mode.desk-embedded .record-context .ticket-status-control{grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;gap:7px!important}
body.full-case-mode .record-context .ticket-status-control .conversation-state-choice{min-height:32px!important;font-size:10.5px!important;font-weight:750!important;box-sizing:border-box!important}
body.full-case-mode .record-context .ticket-at-a-glance{display:block!important;width:100%!important;margin:1px 0 0!important;padding:8px 0 0!important;border-top:1px solid #e7edf3!important;box-sizing:border-box!important}
body.full-case-mode .record-context .ticket-glance-pills{display:flex!important;align-items:center!important;gap:6px!important;flex-wrap:wrap!important;width:100%!important;min-width:0!important}
body.full-case-mode .record-context .ticket-glance-pill{display:inline-flex!important;align-items:center!important;justify-content:center!important;min-width:0!important;min-height:28px!important;margin:0!important;padding:5px 9px!important;border:1px solid #d7dee7!important;border-radius:999px!important;background:#f6f8fa!important;color:#5d6d7d!important;font-family:inherit!important;font-size:10.5px!important;font-weight:750!important;line-height:1.15!important;white-space:nowrap!important;text-align:center!important;box-sizing:border-box!important;box-shadow:none!important;text-decoration:none!important;cursor:pointer!important}
body.full-case-mode .record-context .ticket-glance-pill.is-static{cursor:default!important}
body.full-case-mode .record-context .ticket-glance-pill:not(.is-static):hover{filter:saturate(1.04) brightness(.985)!important;box-shadow:0 0 0 1px currentColor inset!important}
body.full-case-mode .record-context .ticket-glance-pill.tone-unread{border-color:#b9d7ec!important;background:#edf6fc!important;color:#2f6f9d!important}
body.full-case-mode .record-context .ticket-glance-pill.tone-high{border-color:#b8dfd3!important;background:#e7f7f2!important;color:#176b57!important}
body.full-case-mode .record-context .ticket-glance-pill.tone-medium{border-color:#efd39b!important;background:#fff5df!important;color:#96620c!important}
body.full-case-mode .record-context .ticket-glance-pill.tone-low{border-color:#bfd7ef!important;background:#edf5fd!important;color:#356b9e!important}
body.full-case-mode .record-context .ticket-glance-pill.tone-service{border-color:#d6c7e8!important;background:#f6f1fb!important;color:#62428f!important}
body.full-case-mode .record-context .ticket-glance-pill.tone-declined{border-color:#e7c3c6!important;background:#fff0f1!important;color:#9d3d45!important}
body.full-case-mode .record-context .ticket-glance-pill.tone-needs-action{border-color:#efc2bc!important;background:#fff1ef!important;color:#a84436!important}
body.full-case-mode .record-context .ticket-glance-pill.tone-waiting-player{border-color:#c9d6e2!important;background:#f2f5f8!important;color:#556779!important}
body.full-case-mode .record-context .ticket-glance-pill.tone-ready-resolve{border-color:#c6dfcf!important;background:#edf7f0!important;color:#32704a!important}
body.full-case-mode .record-context .ticket-glance-pill.tone-awaiting{border-color:#dedfdd!important;background:#f5f5f4!important;color:#5e6972!important}
body.full-case-mode .record-context .ticket-glance-pill.tone-followup{border-color:#c4daf0!important;background:#edf6ff!important;color:#356b9e!important}
body.full-case-mode .record-context .ticket-glance-pill.tone-followup.is-overdue{border-color:#efc2bc!important;background:#fff1ef!important;color:#a84436!important}
body.full-case-mode .record-context .ticket-glance-pills .ticket-mark-new-button{display:inline-flex!important;flex:0 0 auto!important;width:auto!important;min-height:28px!important;margin:0!important;padding:5px 9px!important;border-radius:7px!important;font-size:10.5px!important;font-weight:800!important;line-height:1.15!important;white-space:nowrap!important}
body.full-case-mode .record-context .record-ticket-utility-row{width:100%!important;min-width:0!important}
body.full-case-mode .record-context .record-ticket-utility-actions{display:flex!important;align-items:stretch!important;gap:7px!important;width:100%!important;min-width:0!important}
body.full-case-mode .record-context .record-ticket-utility-actions .secondary-button{flex:1 1 0!important;min-width:0!important;min-height:32px!important;margin:0!important;padding:6px 9px!important;font-size:10.5px!important;font-weight:750!important;line-height:1.15!important;box-sizing:border-box!important}
@media(max-width:700px){
  body.full-case-mode .record-context .ticket-glance-pills{gap:7px!important}
  body.full-case-mode .record-context .ticket-glance-pill,body.full-case-mode .record-context .ticket-glance-pills .ticket-mark-new-button{min-height:40px!important;padding:8px 11px!important;font-size:16px!important;line-height:1.2!important}
  body.full-case-mode .record-context .ticket-status-control .conversation-state-choice,body.full-case-mode .record-context .record-ticket-utility-actions .secondary-button{min-height:42px!important;font-size:16px!important;line-height:1.2!important}
}
body.full-case-mode.desk-embedded .record-context [data-record-section="ticket-conversations"]:not([hidden]){display:block!important;width:100%!important;margin:0!important;border:1px solid #dce5ee!important;border-radius:8px!important;background:#fff!important;box-shadow:none!important;overflow:hidden!important}
.ticket-conversations-list{display:flex;flex-direction:column;gap:7px}
.ticket-conversation-row{display:flex;flex-direction:column;gap:3px;padding:8px 9px;border:1px solid #e3e9ef;border-radius:7px;background:#fafcfd;color:#34495e}
.ticket-conversation-row>div{display:flex;align-items:center;gap:7px;min-width:0}
.ticket-conversation-row strong{font-size:11px;line-height:1.25}
.ticket-conversation-row small{color:#778899;font-size:9.5px;line-height:1.25}
.ticket-conversation-row>span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#5b6e80;font-size:10px;line-height:1.3}
.ticket-conversation-primary{padding:2px 5px;border-radius:999px;background:#eef4f8;color:#5b6e80;font-size:8.5px;font-weight:750}

/* 2026-09-01 Email-editor toolbar cleanup: one uninterrupted row, no stray rule,
   and every control shares the same vertical geometry. */
@media (min-width:980px){
  body.desk-embedded #inlineMessageEditorChrome,
  body.full-case-mode.desk-embedded #inlineMessageEditorChrome{display:flex!important;align-items:center!important;gap:12px!important;min-height:42px!important;margin:0!important;padding:5px 2px!important;border-top:0!important;overflow:visible!important}
  body.desk-embedded .inline-ai-manual-tools,
  body.full-case-mode.desk-embedded .inline-ai-manual-tools{display:flex!important;align-items:center!important;gap:6px!important;margin:0!important;padding:0!important;border:0!important;flex:0 0 auto!important}
  body.desk-embedded .inline-ai-manual-tools[hidden],
  body.full-case-mode.desk-embedded .inline-ai-manual-tools[hidden]{display:none!important}
  body.desk-embedded .inline-ai-manual-tools .inline-ai-secondary,
  body.full-case-mode.desk-embedded .inline-ai-manual-tools .inline-ai-secondary{height:35px!important;min-height:35px!important;padding:5px 10px!important;border-radius:7px!important;line-height:1!important;box-sizing:border-box!important}
  body.desk-embedded .message-format-toolbar,
  body.full-case-mode.desk-embedded .message-format-toolbar{display:flex!important;align-items:center!important;gap:4px!important;min-width:0!important;margin:0!important;padding:0!important;flex-wrap:nowrap!important}
  body.desk-embedded .message-format-toolbar>button,
  body.desk-embedded .message-editor-icon-button,
  body.full-case-mode.desk-embedded .message-format-toolbar>button,
  body.full-case-mode.desk-embedded .message-editor-icon-button{height:35px!important;min-height:35px!important;box-sizing:border-box!important}
  body.desk-embedded .message-format-divider,
  body.full-case-mode.desk-embedded .message-format-divider{height:22px!important;margin:0 6px!important}
}

/* 2026-09-06 permanent desktop Ticket workspace: Conversation | Compose | Context.
   The former ticket-list rail stays closed. History and writing no longer compete
   vertically, so operators do not have to drag the conversation/composer divider. */
@media (min-width:980px){
  body.full-case-mode.desk-embedded .record-workspace{
    grid-template-columns:minmax(0,3fr) minmax(240px,1fr)!important;
    gap:0!important;
  }
  body.full-case-mode.desk-embedded .record-work{
    grid-column:1!important;
    min-width:0!important;
    padding:0!important;
  }
  body.full-case-mode.desk-embedded .record-context{
    grid-column:2!important;
    min-width:0!important;
    padding:0 8px 10px 10px!important;
    border-left:1px solid #dce4ec!important;
  }
  body.full-case-mode.desk-embedded .desk-context-resizer,
  body.full-case-mode.desk-embedded .ticket-list-header-expand{
    display:none!important;
  }
  body.full-case-mode.desk-embedded .record-conversation{
    display:flex!important;
    height:100%!important;
    min-height:0!important;
    flex-direction:column!important;
    overflow:hidden!important;
  }
  body.full-case-mode.desk-embedded .record-conversation>.conversation-heading{
    flex:0 0 auto!important;
  }
  body.full-case-mode.desk-embedded .history-conversation{
    display:grid!important;
    grid-template-columns:minmax(240px,1fr) minmax(0,2fr)!important;
    grid-template-rows:minmax(0,1fr)!important;
    flex:1 1 0!important;
    width:100%!important;
    height:auto!important;
    min-height:0!important;
    margin:0!important;
    border:0!important;
    border-radius:0!important;
    overflow:hidden!important;
    background:#fff!important;
  }
  body.full-case-mode.desk-embedded .history-conversation .message-thread{
    grid-column:1!important;
    grid-row:1!important;
    width:100%!important;
    height:100%!important;
    min-width:0!important;
    min-height:0!important;
    max-height:none!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    padding:12px!important;
    border-right:1px solid #dce4ec!important;
    box-sizing:border-box!important;
    background:#f7f9fb!important;
  }
  body.full-case-mode.desk-embedded .history-conversation>.conversation-foot,
  body.full-case-mode.desk-embedded .history-conversation>.conversation-composer-resizer,
  body.full-case-mode.desk-embedded .history-conversation>.mobile-open-composer,
  body.full-case-mode.desk-embedded .history-conversation>.sms-usage-summary{
    display:none!important;
  }
  body.full-case-mode.desk-embedded .inline-reply{
    grid-column:2!important;
    grid-row:1!important;
    display:flex!important;
    width:100%!important;
    height:100%!important;
    min-width:0!important;
    min-height:0!important;
    max-height:none!important;
    margin:0!important;
    padding:10px 12px!important;
    border:0!important;
    overflow:hidden!important;
    box-sizing:border-box!important;
    background:#fff!important;
  }
  body.full-case-mode.desk-embedded .inline-reply-text-wrap{
    flex:1 1 0!important;
    min-height:0!important;
    overflow:hidden!important;
  }
  body.full-case-mode.desk-embedded .inline-message-editor-shell{
    flex:1 1 0!important;
    min-height:160px!important;
    margin-top:6px!important;
  }
  body.full-case-mode.desk-embedded #inlineReplyText{
    height:100%!important;
    min-height:160px!important;
    max-height:none!important;
    overflow-y:auto!important;
  }
}

/* Compose with AI is an inline writing aid, not a second composer card. */
.inline-ai-compose{
  margin:6px 0 0!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
.inline-ai-compose-prompt{display:grid!important;gap:6px!important}
.inline-ai-compose-prompt[hidden]{display:none!important}
.inline-ai-compose-input-shell{display:block!important;position:relative!important}
.inline-ai-compose-input-shell textarea{
  display:block!important;
  width:100%!important;
  min-height:44px!important;
  max-height:120px!important;
  padding:9px 11px!important;
  resize:vertical!important;
  box-sizing:border-box!important;
}
.inline-ai-compose-actions{
  display:flex!important;
  align-items:center!important;
  gap:7px!important;
  margin:0!important;
  flex-wrap:wrap!important;
}
.inline-ai-compose-actions .inline-ai-compose-submit{
  position:static!important;
  right:auto!important;
  bottom:auto!important;
  flex:0 0 36px!important;
  width:36px!important;
  height:36px!important;
  min-width:36px!important;
  min-height:36px!important;
  margin:0!important;
  padding:0!important;
  border-radius:7px!important;
}
.inline-ai-compose-actions .inline-ai-compose-close{
  display:grid!important;
  place-items:center!important;
  flex:0 0 36px!important;
  width:36px!important;
  height:36px!important;
  min-width:36px!important;
  min-height:36px!important;
  margin:0!important;
  padding:0!important;
  border:1px solid #d5dde5!important;
  border-radius:7px!important;
  background:#fff!important;
  color:#607080!important;
  font-size:20px!important;
  line-height:1!important;
}
.inline-ai-compose-actions .inline-ai-compose-close:hover{background:#f4f7f9!important;color:#33495d!important}

/* 2026-09-06: use the narrow Conversation column efficiently. Player and Alliance
   messages stack vertically and use the full available width instead of opposing
   left/right bubbles that throw away half the column. */
@media (min-width:980px){
  body.full-case-mode.desk-embedded .history-conversation .message{
    display:block!important;
    width:100%!important;
    margin:0 0 10px!important;
  }
  body.full-case-mode.desk-embedded .history-conversation .message.inbound,
  body.full-case-mode.desk-embedded .history-conversation .message.outbound,
  body.full-case-mode.desk-embedded .history-conversation .message.is-internal{
    justify-content:stretch!important;
  }
  body.full-case-mode.desk-embedded .history-conversation .bubble-message{
    display:block!important;
    width:100%!important;
    max-width:none!important;
    box-sizing:border-box!important;
    border-radius:8px!important;
  }
  body.full-case-mode.desk-embedded .history-conversation .inbound .bubble-message{
    border-bottom-left-radius:8px!important;
  }
  body.full-case-mode.desk-embedded .history-conversation .outbound .bubble-message{
    border-bottom-right-radius:8px!important;
  }
}

/* Compose with AI uses the normal message editor as the single writing surface.
   This bar contains only actions; no second draft or refine box is rendered. */
.inline-ai-compose-bar{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:8px!important;
  min-height:36px!important;
}
.inline-ai-compose-actions[hidden]{display:none!important}
.inline-ai-compose-bar>.inline-ai-compose-close{
  display:grid!important;
  place-items:center!important;
  flex:0 0 36px!important;
  width:36px!important;
  height:36px!important;
  min-width:36px!important;
  min-height:36px!important;
  margin-left:auto!important;
  padding:0!important;
  border:1px solid #d5dde5!important;
  border-radius:7px!important;
  background:#fff!important;
  color:#607080!important;
  font-size:20px!important;
  line-height:1!important;
}
.inline-ai-compose-bar>.inline-ai-compose-close:hover{background:#f4f7f9!important;color:#33495d!important}
.inline-reply-text-wrap.is-ai-compose-mode .inline-message-editor-shell{
  border-color:#9db9d5!important;
}

/* 2026-09-08 Service Desk clarity pass: explicit ticket-tab close control,
   unmistakable expired dates, and a visible voice entry point for Compose with AI. */
#closeDrawer{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:auto!important;
  min-width:58px!important;
  height:30px!important;
  min-height:30px!important;
  padding:0 10px!important;
  border:1px solid #17324d!important;
  border-radius:7px!important;
  background:#17324d!important;
  color:#fff!important;
  font-size:11px!important;
  font-weight:800!important;
  line-height:1!important;
  white-space:nowrap!important;
  box-shadow:0 1px 2px rgba(23,50,77,.14)!important;
}
#closeDrawer:hover{background:#0f2740!important;border-color:#0f2740!important;color:#fff!important}
.linked-player-expiration.is-expired{color:#b42318!important;font-weight:500!important}
.inline-ai-speak-launcher{display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:5px!important;white-space:nowrap!important}
.inline-ai-speak-launcher[hidden]{display:none!important}
@media(max-width:760px){.inline-ai-speak-launcher{flex:1 1 auto!important}}

/* 2026-09-08 ticket-header exit refinement: keep the view-exit action at the
   far right of the Message History bar, but use an X so it cannot be confused
   with the separate Ticket Status Close action. */
.conversation-heading-actions{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:7px!important;
  margin-left:auto!important;
  flex:0 0 auto!important;
}
.conversation-heading-actions .ticket-list-header-expand{margin-left:0!important}
.conversation-heading-actions .ticket-exit-button{
  margin-left:0!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:34px!important;
  min-width:34px!important;
  height:30px!important;
  min-height:30px!important;
  padding:0!important;
  border:1px solid #a9bdcc!important;
  border-radius:7px!important;
  background:#e8f0f6!important;
  color:#29485f!important;
  font-size:19px!important;
  font-weight:600!important;
  line-height:1!important;
  letter-spacing:0!important;
  text-transform:none!important;
  white-space:nowrap!important;
  box-shadow:0 1px 2px rgba(31,55,74,.08)!important;
}
.conversation-heading-actions .ticket-exit-button:hover{
  background:#dce9f2!important;
  border-color:#8faabd!important;
  color:#173b55!important;
}
.conversation-heading-actions .ticket-exit-button:focus-visible{
  outline:2px solid #78aee0!important;
  outline-offset:2px!important;
}