#unified-official-pane {
  --kf-green: #176b50;
  --kf-ink: #24453a;
  --kf-muted: #778b80;
  --kf-line: #e2ece5;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
  color: var(--kf-ink);
}
#unified-official-pane[hidden] { display: none !important; }
#unified-official-pane *, #unified-official-pane *::before, #unified-official-pane *::after { box-sizing: border-box; }
#unified-official-pane button, #unified-official-pane textarea, #unified-official-pane select { font: inherit; }
#unified-official-pane button { touch-action: manipulation; }
#unified-official-pane button:focus-visible, #unified-official-pane input:focus-visible, .kf-entry-dialog button:focus-visible { outline: 3px solid #a2d6bb; outline-offset: 3px; }
#unified-official-pane button:disabled { cursor: not-allowed; opacity: .5; }
.kf-workspace, .kf-conversation { display: flex; flex-direction: column; flex: 1; min-width: 0; min-height: 0; }
.kf-empty { display: grid; place-content: center; justify-items: center; gap: 12px; flex: 1; text-align: center; padding: 32px; color: #778b80; }
.kf-empty h2 { margin: 0; color: #284b3b; font-size: 21px; font-weight: 600; }
.kf-empty p { max-width: 310px; margin: 0; font-size: 13px; line-height: 1.8; }
.kf-empty-icon { display: grid; place-items: center; width: 58px; height: 58px; margin-bottom: 6px; border-radius: 19px; background: #eef7f1; color: #5d9779; font-size: 28px; }
.kf-heading { display: flex; align-items: center; gap: 12px; padding: 19px 24px; border-bottom: 1px solid #e2ece5; flex: none; }
.kf-heading-copy { flex: 1; min-width: 0; }
.kf-heading h2 { margin: 0; font-size: 18px; font-weight: 650; overflow-wrap: anywhere; }
.kf-heading p { margin: 5px 0; font-size: 12px; color: #7a8c80; line-height: 1.5; }
.kf-avatar { display: flex; align-items: center; justify-content: center; flex: none; width: 38px; height: 38px; border-radius: 12px; background: #e7f5ed; color: #2b8058; }
.kf-channel-badge, .unified-channel-badge { display: inline-block; font-size: 10px; padding: 3px 7px; border-radius: 5px; background: #eef7f1; color: #507c61; line-height: 1.4; overflow-wrap: anywhere; }
.unified-channel-badge { white-space: nowrap; }
.unified-channel-badge.clawbot { background: #edf0f6; color: #62708a; }
.kf-call-controls { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }
.kf-call-controls button { min-height: 36px; padding: 7px 10px; font-size: 12px !important; border-radius: 8px; }
.kf-call-controls .icon-button { width: 36px; padding: 5px; font-size: 19px !important; }
.kf-state-note { flex: none; margin: 0; padding: 9px 24px; background: #f5f9f6; color: #617c69; font-size: 12px; line-height: 1.6; }
.kf-state-note:empty { display: none; }
.kf-assign-controls { flex: none; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 24px; border-bottom: 1px solid #e2ece5; font-size: 12px; background: #fff; }
.kf-assign-controls select { min-width: 0; max-width: 100%; padding: 6px 10px; border: 1px solid #dce7df; border-radius: 7px; background: #fff; }
.kf-assign-controls button { font-size: 12px !important; padding: 6px 10px; }
.kf-assign-controls span { color: #788a7f; font-size: 11px; line-height: 1.6; }
.kf-transcript-area { position: relative; display: flex; flex: 1; min-width: 0; min-height: 100px; background: #f8fbf9; }
.kf-transcript { flex: 1; min-width: 0; min-height: 0; overflow: auto; overscroll-behavior: contain; overflow-anchor: none; padding: 20px 24px 24px; scrollbar-width: thin; scrollbar-color: #d6e2d9 transparent; }
.kf-transcript:focus-visible { outline: 2px solid #a2d6bb; outline-offset: -2px; }
.kf-history-more { display: block; margin: 0 auto 18px; padding: 6px 12px !important; color: #6f8878 !important; border-radius: 16px !important; font-size: 12px !important; }
.kf-messages { display: flex; flex-direction: column; gap: 18px; min-height: 100%; }
.kf-messages .message { min-width: 0; max-width: min(78%, 560px); display: flex; flex-direction: column; align-self: flex-start; }
.kf-messages .message.outgoing { align-self: flex-end; }
.kf-messages .bubble { padding: 12px 15px; border: 1px solid #e0e9e3; border-radius: 4px 14px 14px; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; background: #fff; color: #294436; font-size: 14px; line-height: 1.75; }
.kf-messages .outgoing .bubble { border-radius: 14px 4px 14px 14px; background: #e0f2e7; border-color: #c9e6d5; }
.kf-messages .event { align-self: center; max-width: 92%; }
.kf-messages .event .bubble { background: #eef3ef; color: #768a7c; border: 0; border-radius: 8px; font-size: 12px; padding: 7px 12px; text-align: center; }
.kf-messages small, .kf-messages .message-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; font-size: 11px; line-height: 1.5; color: #8a9b8f; }
.kf-messages .outgoing .message-meta, .kf-messages .outgoing small { justify-content: flex-end; }
.kf-messages .message-status { color: #60826e; }
.kf-messages .message-status.is-error, .kf-messages .message-status[data-state="failed"] { color: #b25443; }
.kf-messages .message-status[data-state="unknown"] { color: #a07939; }
.kf-messages .message-day, .kf-messages .message-date-divider { align-self: center; margin: 2px 0 0; padding: 3px 10px; border-radius: 12px; color: #8a9b8f; background: #f0f5f1; font-size: 11px; line-height: 1.5; }
.kf-jump-latest { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 2; max-width: calc(100% - 32px); padding: 9px 16px !important; border: 1px solid #b7d8c4 !important; border-radius: 20px !important; background: #fff !important; color: #287850 !important; box-shadow: 0 5px 18px #24503812; font-size: 12px !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kf-pending { flex: none; max-height: 240px; overflow: auto; margin: 12px 24px; padding: 14px 16px; border: 1px solid #c9ddce; background: #f3faf5; border-radius: 11px; }
.kf-pending-heading { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; align-items: baseline; }
.kf-pending-heading span { flex: none; font-size: 12px; color: #618370; }
.kf-pending p { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; line-height: 1.7; margin: 8px 0; color: #6b816f; }
.kf-pending-preview { margin: 10px 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.75; }
.kf-pending-actions { display: flex; gap: 7px; flex-wrap: wrap; }
.kf-pending-actions button { min-height: 34px; font-size: 12px !important; padding: 7px 11px; }
.kf-pending[data-state="failed"], .kf-pending[data-state="unknown"] { border-color: #ead6b0; background: #fffaf0; }
.kf-pending[data-state="unknown"] .kf-pending-heading span { color: #9a7134; }
.kf-pending[data-state="failed"] .kf-pending-heading span { color: #a65444; }
.kf-composer { flex: none; padding: 15px 24px 14px; border-top: 1px solid #e2ece5; background: #fff; }
.kf-composer-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 9px; }
.kf-composer-heading>label { font-size: 13px; color: #416650; font-weight: 600; }
.kf-draft-status { font-size: 11px; line-height: 1.5; color: #95a397; text-align: right; }
.kf-composer textarea { display: block; width: 100%; min-height: 84px; max-height: 156px; padding: 12px 14px; resize: vertical; border: 1px solid #e0e9e3; border-radius: 10px; background: #fbfdfb; color: #294436; font-size: 14px !important; line-height: 1.65; outline: none; transition: border-color .15s, box-shadow .15s; }
.kf-composer textarea::placeholder { color: #9aaa9c; }
.kf-composer textarea:focus { border-color: #86baa0; background: #fff; box-shadow: 0 0 0 3px #e8f5ed; }
.kf-composer textarea:disabled { background: #f5f8f5; color: #7d8d81; cursor: wait; }
.kf-composer-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; }
.kf-confirm-option { display: inline-flex; align-items: center; gap: 7px; color: #718677; font-size: 12px; cursor: pointer; user-select: none; line-height: 1.5; }
.kf-confirm-option input { width: 15px; height: 15px; margin: 0; accent-color: #176b50; cursor: pointer; }
.kf-send-controls { display: flex; align-items: center; justify-content: flex-end; min-width: 0; gap: 12px; }
.kf-composer-count { color: #98a699; font-size: 11px; line-height: 1.5; text-align: right; }
.kf-composer-count.is-error { color: #ad5544; }
.kf-send-controls button { min-width: 104px; min-height: 39px; padding: 9px 18px; font-size: 13px !important; border-radius: 8px; }
.kf-composer-footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px; margin-top: 8px; min-height: 16px; }
.kf-reply-help, .kf-reply-feedback { margin: 0; font-size: 11px; line-height: 1.6; color: #95a397; }
.kf-reply-feedback { color: #5a8067; }
.kf-reply-feedback:empty { display: none; }
.kf-reply-feedback.is-error { color: #ad5544; }
.kf-notice { flex: none; margin: 0; padding: 8px 24px; border-top: 1px solid #edf1ed; background: #fafcf9; color: #6b816d; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.kf-notice:empty { display: none; }
.kf-consumer-status { flex: none; margin: 0; padding: 5px 24px 8px; color: #97a69a; font-size: 10px; line-height: 1.5; background: #fff; }
.kf-entry-dialog { width: min(620px, 94vw); }
.kf-entry-panel { display: flex; align-items: center; gap: 24px; padding: 22px 0; }
.kf-entry-panel>div { min-width: 0; }
.kf-entry-panel p { margin: 9px 0; font-size: 13px; line-height: 1.7; }
.kf-entry-panel img { width: 200px; height: 200px; flex: none; }
.kf-entry-panel select { max-width: 100%; margin: 8px 0; padding: 7px 10px; border: 1px solid #dce7df; border-radius: 7px; background: #fff; color: #28463d; }
.kf-entry-panel label { display: block; font-size: 12px; color: #687d73; }
.unified-filter-note { font-size: 10px; line-height: 1.7; color: #88958d; padding: 9px 16px; }
.unified-list-more { width: calc(100% - 32px); margin: 7px 16px; font-size: 12px; }
.unified-unread { display: inline-flex; align-items: center; justify-content: center; flex: none; min-width: 17px; height: 17px; padding: 0 5px; border-radius: 10px; background: #2c8e63; color: #fff; font-size: 10px; font-weight: 600; }
.unified-last-time { flex: none; color: #96a399; font-size: 10px; font-weight: 400; }
.unified-list-notice { margin: 0; padding: 8px 16px; color: #748677; font-size: 11px; line-height: 1.7; background: #f6faf7; }
.call-invitation-card { display: flex; align-items: center; gap: 13px; width: min(340px, 100%); padding: 12px; background: #fff; border: 1px solid #dde8e0; border-radius: 10px; white-space: normal; }
.call-invitation-card>img { width: 74px; height: 74px; object-fit: cover; flex: none; border-radius: 8px; }
.call-invitation-copy { min-width: 0; }
.call-invitation-copy strong { display: block; font-size: 14px; color: #214536; }
.call-invitation-copy p { margin: 6px 0 !important; font-size: 12px !important; line-height: 1.5; }
.call-invitation-copy>span { display: block; padding-top: 5px; font-size: 11px; color: #287853; }
.message .call-card-bubble { padding: 0; background: transparent !important; border: 0 !important; }
.kf-messages .voice-message { display: flex; flex-direction: column; gap: 7px; width: min(280px, 64vw); white-space: normal; }
.kf-messages .voice-play { width: 100%; min-height: 42px; padding: 9px 13px; text-align: left; border: 1px solid #c4dfce; border-radius: 8px; background: #f0f8f3; color: #246543; font-size: 13px !important; }
.kf-messages .voice-play:disabled { opacity: .5; cursor: not-allowed; }
.kf-messages .voice-play:focus-visible { outline: 3px solid #a2d6bb; outline-offset: 3px; }
.kf-messages .voice-audio { display: block; width: 100%; height: 40px; }
.kf-messages .voice-status { font-size: 11px; line-height: 1.5; color: #826646; }
.kf-messages .voice-status:empty { display: none; }
.kf-composer .attachment-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 7px; }
.kf-composer .attachment-tools button { min-height: 32px; padding: 5px 10px; font-size: 12px !important; }
.kf-composer .attachment-tools>span { font-size: 10px; color: #84958a; }
.kf-composer .attachment-draft { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-top: 8px; padding: 8px 10px; border: 1px solid #d5e5da; border-radius: 8px; background: #f5faf6; }
.kf-composer .attachment-draft>img { width: 52px; height: 52px; object-fit: contain; border-radius: 4px; background: #fff; }
.kf-composer .attachment-draft-copy { flex: 1; min-width: 90px; overflow-wrap: anywhere; }
.kf-composer .attachment-draft-copy strong,.kf-composer .attachment-draft-copy span { display: block; font-size: 12px; line-height: 1.5; }
.kf-composer .attachment-draft-copy span { color: #7b8e80; font-size: 10px; }
.kf-composer .attachment-draft button { min-height: 34px; padding: 6px 9px; font-size: 12px !important; }
.kf-composer .attachment-feedback { margin: 5px 0 0; font-size: 11px; line-height: 1.5; color: #7b7558; overflow-wrap: anywhere; }
.kf-composer .attachment-feedback:empty { display: none; }
.kf-messages .attachment-message { display: flex; flex-direction: column; gap: 6px; width: min(260px, 62vw); white-space: normal; }
.kf-messages .attachment-filename { font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.kf-messages .attachment-bytes,.kf-messages .attachment-status { font-size: 11px; line-height: 1.5; color: #7c8d81; }
.kf-messages .attachment-bytes:empty,.kf-messages .attachment-status:empty { display: none; }
.kf-messages .attachment-open { min-height: 36px; text-align: left; padding: 7px 11px; font-size: 12px !important; }
.kf-messages .attachment-media-image { display: block; width: 100%; max-height: 300px; object-fit: contain; border-radius: 5px; }
.kf-messages .attachment-media-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; font-size: 12px; }
.kf-messages .attachment-media-actions button { padding: 5px 8px; font-size: 11px !important; }
.kf-messages .attachment-media-image[role="button"] { cursor: zoom-in; }
dialog.attachment-viewer { position: fixed; inset: 0; width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: max(14px, env(safe-area-inset-top)) 18px max(14px, env(safe-area-inset-bottom)); border: 0; border-radius: 0; background: #10191ff5; color: #fff; box-sizing: border-box; }
dialog.attachment-viewer[open] { display: flex; flex-direction: column; gap: 14px; }
dialog.attachment-viewer::backdrop { background: #10191f; }
.attachment-viewer-toolbar { display: flex; flex: none; align-items: center; gap: 12px; }
.attachment-viewer-toolbar h2 { flex: 1; min-width: 0; margin: 0; font: 500 14px/1.5 system-ui, sans-serif; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attachment-viewer-toolbar a,.attachment-viewer-toolbar button { flex: none; min-height: 40px; padding: 9px 14px; border: 1px solid #ffffff60; border-radius: 7px; background: transparent; color: #fff; font: 14px/1.5 system-ui, sans-serif; text-decoration: none; cursor: pointer; box-sizing: border-box; }
.attachment-viewer-toolbar a:focus-visible,.attachment-viewer-toolbar button:focus-visible,.kf-messages .attachment-media-image[role="button"]:focus-visible { outline: 3px solid #a2d6bb; outline-offset: 3px; }
.attachment-viewer>img { display: block; flex: 1; width: 100%; height: 0; min-height: 0; min-width: 0; object-fit: contain; }
@media (max-width: 760px) {
  .kf-heading { padding: 13px 16px; gap: 10px; flex-wrap: wrap; }
  .kf-heading h2 { font-size: 16px; }
  .kf-heading p { font-size: 11px; }
  .kf-call-controls { width: 100%; padding-left: 46px; gap: 6px; }
  .kf-call-controls button { min-height: 36px; }
  .kf-state-note, .kf-notice, .kf-consumer-status { padding-left: 16px; padding-right: 16px; }
  .kf-state-note { padding-top: 7px; padding-bottom: 7px; font-size: 11px; }
  .kf-assign-controls { padding: 8px 16px; }
  .kf-assign-controls span { width: 100%; }
  .kf-transcript { padding: 16px 16px 20px; }
  .kf-messages { gap: 16px; }
  .kf-messages .message { max-width: 88%; }
  .kf-messages .bubble { font-size: 14px; padding: 10px 12px; }
  .kf-composer { padding: 12px 16px max(12px, env(safe-area-inset-bottom)); }
  .kf-composer textarea { min-height: 78px; max-height: 132px; font-size: 16px !important; }
  .kf-pending { margin: 10px 16px; max-height: 195px; padding: 12px; }
  .kf-draft-status { font-size: 10px; }
  .kf-send-controls { gap: 8px; }
  .kf-send-controls button { min-height: 42px; min-width: 92px; padding: 9px 13px; }
  .kf-confirm-option { padding: 5px 0; }
  .kf-entry-panel { flex-direction: column; gap: 12px; }
  .kf-entry-panel img { width: 220px; height: 220px; }
  #workbench:not(.chat-open) #unified-official-pane { display: none; }
  #workbench.chat-open #unified-official-pane:not([hidden]) { display: flex; }
}
@media (max-width: 400px) {
  .kf-heading { padding: 11px 12px; }
  .kf-call-controls { padding-left: 0; }
  .kf-composer, .kf-transcript { padding-left: 12px; padding-right: 12px; }
  .kf-composer-heading { gap: 8px; }
  .kf-draft-status { max-width: 56%; }
  .kf-send-controls { gap: 6px; }
  .kf-composer-count { max-width: 85px; }
  .kf-pending { margin-left: 12px; margin-right: 12px; }
}
@media (pointer: coarse) {
  .kf-reply-help { display: none; }
  .kf-composer-footer:has(.kf-reply-feedback:empty) { min-height: 0; margin-top: 0; }
}
@media (max-width: 600px) {
  .call-invitation-card { gap: 9px; padding: 9px; }
  .call-invitation-card>img { width: 60px; height: 60px; }
}

.unified-list-notice { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 8px; padding: 10px 16px; border-bottom: 1px solid #dfece3; background: #f0f8f2; }
#kf-new-message-copy { flex: 1; min-width: 100px; color: #447453; font-size: 12px; line-height: 1.6; }
.unified-list-notice button { min-height: 29px; padding: 5px 8px; border-radius: 6px; font-size: 11px; }
#kf-show-unread { color: #23774f; border-color: #b7d9c4; background: #fff; }
#kf-dismiss-new-notice { color: #859788; background: transparent; border-color: transparent; }
.reception-stat.unseen { color: #4b8160; }
.reception-stat.unseen strong, #kf-unseen-total { color: #2c8e63; }
@media (max-width: 760px) {
  .unified-list-notice { padding: 9px 12px; gap: 5px 7px; }
  #kf-new-message-copy { font-size: 11px; }
  .unified-list-notice button { min-height: 30px; }
}

/* Dynamic composer state classes are shared by standalone and embedded views. */
.kf-composer .composer-count { color: #98a699; font-size: 11px; line-height: 1.5; text-align: right; overflow-wrap: anywhere; }
.kf-composer .composer-count.is-error { color: #ad5544; }
.kf-composer .reply-feedback { margin: 0; color: #5a8067; font-size: 11px; line-height: 1.6; overflow-wrap: anywhere; }
.kf-composer .reply-feedback:empty { display: none; }
.kf-composer .reply-feedback.is-error { color: #ad5544; }
.kf-pending { flex: 0 1 auto; min-height: 0; }
.kf-pending-heading>strong { min-width: 0; }
.kf-pending-heading span { flex: 0 1 auto; min-width: 0; overflow-wrap: anywhere; text-align: right; }
@media (max-width: 400px) {
  .kf-composer .composer-count { max-width: 85px; }
}
@media (pointer: coarse) {
  .kf-composer-footer:has(.reply-feedback:empty) { min-height: 0; margin-top: 0; }
}
@media (max-width: 760px) and (max-height: 650px) {
  .kf-heading { padding: 9px 12px; gap: 7px; }
  .kf-heading .kf-avatar, .kf-heading p, .kf-heading .kf-channel-badge { display: none; }
  .kf-heading h2 { font-size: 14px; }
  .kf-call-controls { width: auto; padding-left: 0; gap: 4px; }
  .kf-call-controls button { min-height: 32px; padding: 5px 7px; font-size: 11px !important; }
  .kf-call-controls .icon-button { width: 30px; }
  .kf-state-note { padding: 6px 12px; }
  .kf-transcript-area { min-height: 45px; }
  .kf-composer { padding-top: 9px; }
  .kf-composer-heading { margin-bottom: 6px; }
  .kf-composer textarea { min-height: 56px; max-height: 88px; padding-top: 9px; padding-bottom: 9px; }
  .kf-consumer-status { display: none; }
  .kf-pending { max-height: 135px; }
}

/* Successful text replies keep a small result bar beside the next draft. */
.kf-pending[data-compact="true"] {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 12px;
  min-height: 46px;
  max-height: none;
  overflow: visible;
  margin-top: 8px;
  margin-bottom: 8px;
  padding: 7px 12px;
}
.kf-pending[data-compact="true"] .kf-pending-heading {
  flex: 1 1 120px;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: wrap;
  gap: 3px 8px;
  min-width: 0;
  font-size: 12px;
  line-height: 1.5;
}
.kf-pending[data-compact="true"] .kf-pending-heading span { text-align: left; font-size: 11px; }
.kf-pending[data-compact="true"] .kf-pending-actions { flex: 0 0 auto; gap: 6px; margin: 0 0 0 auto; }
.kf-pending[data-compact="true"] .kf-pending-actions button { min-height: 30px; padding: 5px 9px; font-size: 11px !important; }
@media (max-width: 760px) {
  .kf-pending[data-compact="true"] { min-height: 46px; gap: 5px 8px; padding: 7px 10px; }
  .kf-pending[data-compact="true"] .kf-pending-actions button { min-height: 34px; }
}

/* Fit the reply area to the available viewport instead of overflowing its footer. */
.kf-conversation { overflow: auto; overscroll-behavior: contain; }
.kf-transcript-area { flex: 1 1 0; min-height: 0; }
.kf-notice { flex: 0 0 auto; max-height: 42px; overflow: auto; }
.kf-consumer-status { flex: 0 0 auto; padding-top: 2px; padding-bottom: 2px; font-size: 9px; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-height: 780px), (max-width: 760px) {
  .kf-heading { padding: 11px 16px; gap: 9px; flex-wrap: nowrap; }
  .kf-heading .kf-avatar, .kf-heading p { display: none; }
  .kf-heading h2 { font-size: 16px; line-height: 1.4; }
  .kf-heading .kf-channel-badge { display: inline-block; padding: 2px 6px; font-size: 10px; line-height: 1.35; }
  .kf-call-controls { width: auto; padding-left: 0; gap: 6px; flex-wrap: nowrap; }
  .kf-call-controls button { min-height: 32px; padding: 6px 8px; font-size: 11px !important; white-space: nowrap; }
  .kf-call-controls .icon-button { width: 30px; padding: 4px; font-size: 18px !important; }
  .kf-state-note { padding: 6px 16px; font-size: 11px; line-height: 1.5; }
  .kf-assign-controls { padding: 6px 16px; gap: 6px; font-size: 11px; }
  .kf-assign-controls select { flex: 0 1 150px; min-width: 84px; max-width: 160px; min-height: 29px; padding: 5px 8px; font-size: 12px !important; }
  .kf-assign-controls button { min-height: 29px; padding: 5px 8px; font-size: 11px !important; }
  .kf-assign-controls span { display: none; }
  .kf-composer { padding: 10px 16px max(9px, env(safe-area-inset-bottom)); }
  .kf-composer-heading { margin-bottom: 6px; gap: 8px; line-height: 1.4; }
  .kf-composer-heading>label { font-size: 12px; }
  .kf-draft-status { font-size: 10px; line-height: 1.4; }
  .kf-composer textarea { min-height: 64px; max-height: 88px; padding: 9px 12px; line-height: 1.5; }
  .kf-composer-tools { margin-top: 7px; gap: 8px; }
  .kf-confirm-option { font-size: 11px; padding: 3px 0; }
  .kf-send-controls button { min-height: 36px; padding: 7px 14px; font-size: 12px !important; }
  .kf-composer-footer { min-height: 0; margin-top: 4px; gap: 3px 10px; }
  .kf-reply-help, .kf-reply-feedback, .kf-composer .reply-feedback { font-size: 10px; line-height: 1.45; }
  .kf-notice { padding: 4px 16px; font-size: 11px; line-height: 1.5; }
}
@media (max-width: 760px) {
  .kf-send-controls button { min-height: 42px; padding: 9px 13px; }
  .kf-composer textarea { font-size: 16px !important; }
  .kf-transcript-area { min-height: 0; }
}
@media (max-width: 400px) {
  .kf-heading, .kf-state-note, .kf-assign-controls, .kf-composer { padding-left: 12px; padding-right: 12px; }
  .kf-heading { gap: 7px; }
  .kf-call-controls { gap: 4px; }
  .kf-call-controls button { padding-left: 7px; padding-right: 7px; }
  .kf-assign-controls select { flex-basis: 132px; max-width: 140px; }
}
@media (max-height: 600px) {
  .kf-heading { padding-top: 8px; padding-bottom: 8px; }
  .kf-state-note { padding-top: 4px; padding-bottom: 4px; }
  .kf-composer { padding-top: 8px; padding-bottom: max(7px, env(safe-area-inset-bottom)); }
  .kf-composer textarea { min-height: 52px; max-height: 64px; }
  .kf-reply-help { display: none; }
  .kf-pending[data-compact="true"] { margin-top: 5px; margin-bottom: 5px; }
}

/* Incoming calls remain visible independently of the selected chat. */
.incoming-banner { margin: 0 0 14px; padding: 14px 18px; border: 1px solid #95c9ad; border-radius: 12px; background: #effaf3; color: #24453a; box-shadow: 0 3px 14px #1b67450a; }
.incoming-banner[hidden] { display: none !important; }
.incoming-heading { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.incoming-heading>strong { font-size: 15px; }
.incoming-heading>span,.incoming-copy p,.incoming-feedback { font-size: 12px; line-height: 1.6; color: #567563; }
.incoming-request { display: flex; gap: 16px; align-items: center; justify-content: space-between; padding: 10px 0; border-top: 1px solid #d8eade; }
.incoming-copy { min-width: 0; }
.incoming-copy strong { font-size: 14px; overflow-wrap: anywhere; }
.incoming-copy p { margin: 5px 0 0; }
.incoming-actions { display: flex; flex: none; gap: 8px; }
.incoming-actions button { min-height: 40px; font: inherit; border: 1px solid #bad6c4; border-radius: 8px; padding: 8px 16px; background: #fff; color: #315d43; cursor: pointer; }
.incoming-actions button.primary { background: #176b50; color: #fff; border-color: #176b50; }
.incoming-actions button:disabled { opacity: .5; cursor: wait; }
.incoming-actions button:focus-visible { outline: 3px solid #a2d6bb; outline-offset: 3px; }
.incoming-feedback { margin: 6px 0 0; }
.incoming-feedback:empty { display: none; }
@media (max-width: 600px) { .incoming-banner { margin: 8px 10px; padding: 12px; } .incoming-request { align-items: stretch; flex-direction: column; gap: 10px; } .incoming-actions button { flex: 1; } .incoming-heading>span { display: none; } }

/* Professional inbox. These overrides style the shared shell without changing
   legacy administration dialogs, channel permissions, or message state. */
#workbench {
  --ink: #202b35;
  --muted: #78838d;
  --line: #e7ebee;
  --green: #16765e;
  --deep: #105c49;
  --mint: #edf6f1;
  --surface: #f7f8fa;
  --sidebar: 300px;
  color: var(--ink);
  background: #fff;
  font-size: 13px;
}
#workbench .topbar {
  height: 58px;
  min-height: 58px;
  gap: 18px;
  padding: 0 20px;
  background: #fff;
  border-bottom-color: var(--line);
}
#workbench .topbar .brand { gap: 9px; }
#workbench .topbar .brandmark { width: 28px; height: 28px; border-radius: 8px; font-size: 18px; background: var(--green); }
#workbench .topbar .brandmark>span { width: 4px; height: 4px; bottom: 4px; right: 4px; }
#workbench .topbar .brand strong { font-size: 16px; color: #202b35; }
#workbench .topbar .workspace-name { font-size: 12px; border-left-color: var(--line); color: #8a939b; }
#workbench .header-actions { min-width: 0; gap: 8px; }
#workbench .header-actions button, #workbench .workbench-menu summary { min-height: 34px; border-radius: 7px; font-size: 12px; }
#workbench #invite-open { padding: 7px 11px; background: var(--green); border-color: var(--green); }
#workbench #invite-open:hover:not(:disabled) { background: var(--deep); border-color: var(--deep); }
#workbench #kf-entry-toggle { padding: 7px 10px; color: #53616d; border: 1px solid var(--line); background: #fff; }
#workbench #kf-entry-toggle:hover:not(:disabled) { background: #f6f8fa; border-color: #d2dadf; }
#workbench .admin-avatar { width: 28px; height: 28px; color: #536572; background: #eef1f4; }
#workbench .admin-label { color: #53616d; }
#workbench .workbench-menu summary { padding: 7px 10px; color: #53616d; border-color: var(--line); }
#workbench .workbench-menu[open] summary { background: #f5f7f9; border-color: #d5dce1; }
#workbench .workbench-menu-items { border-color: var(--line); box-shadow: 0 8px 24px #1f2d3d14; }
#workbench .workbench-menu-items button { color: #465561; }
#workbench #sync-status:not(.bad), #workbench #last-sync, #workbench #reception-note[hidden] { display: none !important; }
#workbench #sync-status.bad { display: flex; font-size: 11px; color: #b45440; }
#workbench .reception-bar { min-height: 36px; gap: 23px; padding: 5px 20px; background: #fbfcfd; border-bottom-color: var(--line); }
#workbench .reception-stat { gap: 6px; color: #7c8790; font-size: 11px; }
#workbench .reception-stat b { font-size: 13px; font-weight: 650; color: #53616d; }
#workbench .reception-stat.unseen b { color: var(--green); }
#workbench .reception-stat.urgent b { color: #b26040; }
#workbench .reception-stat.review b { color: #986731; }
#workbench #reception-note:not([hidden]) { display: inline; font-size: 11px; color: #a46934; }
#workbench .workspace { grid-template-columns: 300px minmax(0, 1fr); background: #fff; }
#workbench .workspace.details-open { grid-template-columns: 300px minmax(0, 1fr) 270px; }
#workbench .sidebar { background: #fbfcfd; border-right-color: var(--line); min-width: 0; }
#workbench .aside-heading { padding: 20px 18px 15px; }
#workbench .aside-heading .small-eye { display: none; }
#workbench .aside-heading h2 { margin: 0; font-size: 16px; color: #26323c; }
#workbench .count { padding: 1px 6px; margin-left: 5px; background: #edf0f3; color: #7b858e; font-size: 11px; }
#workbench .icon-button { border-color: transparent; background: transparent; color: #7b8790; border-radius: 6px; }
#workbench .icon-button:hover:not(:disabled) { background: #edf1f4; border-color: transparent; color: #344552; }
#workbench .search-box { margin: 0 16px; background: #f1f4f6; border-color: transparent; border-radius: 7px; }
#workbench .search-box:focus-within { background: #fff; border-color: #9cbcb0; box-shadow: 0 0 0 2px #e8f3ee; }
#workbench .search-box input { padding: 10px 8px; color: #354551; font-size: 12px; }
#workbench .search-box input::placeholder { color: #8b969e; }
#workbench .list-tabs { padding: 16px 18px 0; gap: 20px; border-bottom-color: var(--line); }
#workbench .list-tabs .tab { color: #86919a; padding-bottom: 10px; font-size: 12px; }
#workbench .list-tabs .tab.active { color: var(--green); border-bottom-color: var(--green); }
#workbench .status-filter { padding: 9px 18px; color: #8b959d; border-bottom-color: var(--line); }
#workbench .status-filter select { font-size: 11px; color: #687680; background: transparent; }
#workbench .session-list { padding: 7px 8px 12px; scrollbar-width: thin; scrollbar-color: #d7dfe4 transparent; }
#workbench .item { gap: 10px; margin: 2px 0; padding: 13px 10px; border-radius: 8px; background: transparent; }
#workbench .item:hover:not(:disabled) { background: #f0f3f5; border-color: transparent; }
#workbench .item.active, #workbench .item.active:hover:not(:disabled) { background: #edf5f1; border-color: #d8e9df; }
#workbench .item .avatar { width: 36px; height: 36px; min-width: 36px; border-radius: 10px; font-size: 13px; }
#workbench .item .kf-avatar { background: #e8f1ec; color: #4d7f67; }
#workbench .item-top { gap: 7px; }
#workbench .item-top b { font-size: 13px; font-weight: 600; color: #2b3b46; }
#workbench .item-top time { color: #949ea6; font-size: 10px; }
#workbench .item-preview { margin: 4px 0 7px; color: #7f8c96; font-size: 12px; line-height: 1.6; }
#workbench .item-bottom { gap: 6px; align-items: flex-start; flex-wrap: wrap; }
#workbench .item-owner { flex: 1; min-width: 0; color: #8d989f; font-size: 10px; line-height: 1.5; text-align: right; white-space: normal; overflow-wrap: anywhere; }
#workbench .unified-channel-badge { border-radius: 4px; padding: 1px 5px; background: #f1f4f5; color: #87948d; font-size: 9px; }
#workbench .unified-channel-badge.clawbot { background: #edf0f5; color: #7b899a; }
#workbench .unified-unread { min-width: 16px; height: 16px; padding: 0 4px; background: var(--green); font-size: 9px; }
#workbench .sidebar-foot { padding: 12px 18px; background: #fbfcfd; border-top-color: var(--line); }
#workbench .auto-switch { color: #86939c; font-size: 11px; }
#workbench .sidebar-foot .list-note { color: #8b959d; }
#workbench .unified-list-notice { padding: 10px 16px; background: #f0f7f3; border-bottom-color: #dcebe2; }
#workbench #kf-new-message-copy { font-size: 11px; color: #4f7a62; }
#workbench .unified-list-notice button { min-height: 30px; }
#workbench .unified-filter-note { font-size: 11px; color: #85939d; }

#unified-official-pane { --kf-ink: #26343e; --kf-muted: #84919a; --kf-green: #16765e; --kf-line: #e7ebee; background: #fff; color: var(--kf-ink); }
#unified-official-pane .kf-workspace, #unified-official-pane .kf-conversation { overflow: hidden; }
#unified-official-pane .kf-empty { gap: 10px; background: #f9fafb; color: #8a959d; }
#unified-official-pane .kf-empty-icon { width: 44px; height: 44px; font-size: 21px; background: #edf2f0; border-radius: 12px; color: #7e9d8b; }
#unified-official-pane .kf-empty h2 { font-size: 16px; font-weight: 600; color: #50616c; }
#unified-official-pane .kf-empty p { font-size: 12px; color: #8a959d; }
#unified-official-pane .kf-heading { min-height: 65px; padding: 13px 24px; gap: 12px; flex-wrap: nowrap; border-bottom-color: var(--kf-line); background: #fff; }
#unified-official-pane .kf-heading>.kf-avatar { display: none; }
#unified-official-pane .kf-heading-copy { min-width: 0; }
#unified-official-pane .kf-heading h2 { font-size: 16px; font-weight: 600; line-height: 1.5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #25343e; }
#unified-official-pane #kf-conversation-status { display: block; font-size: 11px; margin: 3px 0 0; color: #8b969e; }
#unified-official-pane #kf-conversation-status:empty { display: none; }
#unified-official-pane .kf-call-controls { width: auto; padding: 0; flex: none; gap: 6px; flex-wrap: nowrap; }
#unified-official-pane .kf-call-controls button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 34px; padding: 7px 10px; border-radius: 7px; font-size: 12px !important; line-height: 1.3; color: #5b6b77; border: 1px solid #e3e8ec; background: #fff; white-space: nowrap; }
#unified-official-pane .kf-call-controls button:hover:not(:disabled) { color: #235e47; background: #f3f8f5; border-color: #ccded3; }
#unified-official-pane .kf-call-controls .icon-button { width: 34px; padding: 6px; border-color: transparent; background: transparent; }
#unified-official-pane #kf-details-toggle[aria-expanded="true"] { color: var(--kf-green); background: #edf6f1; }
#unified-official-pane button svg { width: 16px; height: 16px; flex: none; stroke-width: 1.7; }
#unified-official-pane .kf-conversation-body { display: flex; flex: 1; min-width: 0; min-height: 0; position: relative; overflow: hidden; }
#unified-official-pane .kf-chat-main { display: flex; flex: 1; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; }
#unified-official-pane .kf-send-warning { flex: none; margin: 0; padding: 8px 24px; border-bottom: 1px solid #efe3ca; background: #fff9ef; color: #9b703d; font-size: 11px; line-height: 1.65; overflow-wrap: anywhere; }
#unified-official-pane .kf-send-warning[hidden] { display: none !important; }
#unified-official-pane .kf-transcript-area { flex: 1 1 0; min-height: 0; background: #f8fafb; }
#unified-official-pane .kf-transcript { padding: 24px 28px 28px; scrollbar-color: #d8e0e5 transparent; }
#unified-official-pane .kf-messages { gap: 19px; }
#unified-official-pane .kf-messages .message { max-width: min(78%, 580px); }
#unified-official-pane .kf-messages .bubble { border-color: #e5eaed; color: #344550; background: #fff; border-radius: 3px 11px 11px; padding: 10px 13px; font-size: 13px; line-height: 1.8; box-shadow: 0 1px 1px #25354703; }
#unified-official-pane .kf-messages .outgoing .bubble { color: #284b3e; background: #e4f2e9; border-color: #d5e8dc; border-radius: 11px 3px 11px 11px; }
#unified-official-pane .kf-messages .message-meta, #unified-official-pane .kf-messages small { margin-top: 5px; color: #96a0a7; font-size: 10px; line-height: 1.5; }
#unified-official-pane .kf-messages .message-status { color: #7c9788; font-size: 10px; }
#unified-official-pane .kf-messages .message-status.is-error, #unified-official-pane .kf-messages .message-status[data-state="failed"] { color: #b3614b; }
#unified-official-pane .kf-messages .message-status[data-state="unknown"] { color: #a67c3b; }
#unified-official-pane .kf-messages .message-date-divider { padding: 2px 8px; background: #f0f3f5; color: #98a2a9; font-size: 10px; }
#unified-official-pane .kf-messages .event .bubble { color: #87959e; background: #eef2f4; border: 0; padding: 5px 10px; font-size: 11px; }
#unified-official-pane .kf-history-more { color: #84969f !important; border-color: #e2e8ec; background: #fff; margin-bottom: 20px; }
#unified-official-pane .kf-jump-latest { color: #42725b !important; border-color: #cdddd2 !important; box-shadow: 0 3px 12px #263b3110; }
#unified-official-pane .kf-pending { margin: 10px 24px; padding: 12px 14px; border-radius: 8px; border-color: #dce8df; background: #f4f9f6; max-height: 220px; }
#unified-official-pane .kf-pending[data-compact="true"] { display: none !important; }
#unified-official-pane .kf-pending[data-text-inline="true"]:not([hidden]) { display: flex !important; flex: 0 0 auto; flex-wrap: wrap; align-items: center; gap: 6px 12px; max-height: none; overflow: visible; margin: 5px 24px; padding: 6px 10px; border-radius: 7px; }
#unified-official-pane .kf-pending[data-text-inline="true"] .kf-pending-heading { display: contents; }
#unified-official-pane .kf-pending[data-text-inline="true"] .kf-pending-heading span { flex: 1 1 100px; text-align: left; color: #7b7558; font-size: 11px; line-height: 1.5; }
#unified-official-pane .kf-pending[data-text-inline="true"] .kf-pending-preview { order: 1; flex: 1 1 100%; max-height: 48px; overflow: auto; margin: 0; font-size: 12px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
#unified-official-pane .kf-pending[data-text-inline="true"] .kf-pending-actions { margin: 0; gap: 6px; }
#unified-official-pane .kf-pending[data-text-inline="true"] .kf-pending-actions button { min-height: 32px; padding: 5px 9px; font-size: 11px !important; }
#unified-official-pane .kf-pending[data-state="unknown"], #unified-official-pane .kf-pending[data-state="failed"] { background: #fff9ef; border-color: #ead9b8; }
#unified-official-pane .kf-pending-heading { font-size: 12px; color: #536a5e; }
#unified-official-pane .kf-pending-actions { margin-top: 9px; }
#unified-official-pane .kf-pending-actions button { border-radius: 6px; min-height: 34px; padding: 7px 10px; }

#unified-official-pane .kf-composer { flex: none; padding: 13px 24px 14px; border-top: 1px solid var(--kf-line); background: #fff; }
#unified-official-pane .kf-composer-heading { margin-bottom: 7px; }
#unified-official-pane .kf-composer-heading>label { font-size: 12px; color: #7b8993; font-weight: 500; }
#unified-official-pane #kf-draft-status:not([hidden]) { font-size: 11px; color: #a36d35; }
#unified-official-pane .kf-composer .attachment-tools { gap: 5px; margin: 0 0 6px; }
#unified-official-pane .kf-composer .attachment-tools button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 32px; padding: 5px 8px; background: transparent; border-color: transparent; border-radius: 6px; color: #6b7c88; font-size: 12px !important; }
#unified-official-pane .kf-composer .attachment-tools button:hover:not(:disabled) { background: #f1f5f7; color: #405965; border-color: transparent; }
#unified-official-pane .kf-composer .attachment-tools>span { display: none; }
#unified-official-pane .kf-composer textarea { min-height: 82px; max-height: 150px; padding: 11px 13px; border: 1px solid #dde5ea; border-radius: 8px; background: #fcfdfd; color: #344550; font-size: 14px !important; line-height: 1.65; resize: vertical; }
#unified-official-pane .kf-composer textarea::placeholder { color: #a0aab1; }
#unified-official-pane .kf-composer textarea:focus { border-color: #8bb5a1; background: #fff; box-shadow: 0 0 0 2px #edf6f1; }
#unified-official-pane .kf-composer textarea:disabled { background: #f7f9fa; color: #8a969f; }
#unified-official-pane .kf-composer-tools { justify-content: flex-end; gap: 10px; margin-top: 9px; }
#unified-official-pane .kf-send-controls { gap: 12px; }
#unified-official-pane .kf-composer .composer-count, #unified-official-pane .kf-composer-count { color: #a0abb3; font-size: 10px; }
#unified-official-pane .kf-composer .composer-count.is-error { color: #b3614b; }
#unified-official-pane .kf-send-controls button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 86px; min-height: 36px; padding: 8px 17px; border-radius: 7px; font-size: 12px !important; background: var(--kf-green); border-color: var(--kf-green); font-weight: 500; }
#unified-official-pane .kf-send-controls button:hover:not(:disabled) { background: #105c49; border-color: #105c49; }
#unified-official-pane .kf-composer-footer { min-height: 0; margin-top: 6px; gap: 4px 12px; align-items: flex-start; }
#unified-official-pane .kf-reply-help { color: #a0aab2; font-size: 10px; line-height: 1.5; }
#unified-official-pane #kf-reply-feedback:not(.is-error), #unified-official-pane #kf-attachment-feedback:not(.is-error), #unified-official-pane #kf-consumer-status:not(.is-error) { display: none; }
#unified-official-pane #kf-reply-feedback.is-error, #unified-official-pane #kf-attachment-feedback.is-error { display: block; margin: 0; font-size: 11px; line-height: 1.6; color: #b3614b; }
#unified-official-pane #kf-attachment-feedback.is-error { margin-top: 6px; }
#unified-official-pane #kf-consumer-status.is-error { display: block; padding: 7px 24px; color: #9b703d; background: #fff9ef; font-size: 11px; line-height: 1.6; white-space: normal; max-height: 64px; overflow: auto; }
#unified-official-pane .kf-notice { background: #f9fafb; border-top-color: var(--kf-line); color: #7d8d97; font-size: 11px; padding: 6px 24px; }
#unified-official-pane .kf-composer .attachment-draft { background: #f6f8fa; border-color: #e2e8ed; border-radius: 7px; padding: 8px 10px; }
#unified-official-pane .kf-composer .attachment-draft-copy strong { color: #455965; font-size: 12px; }
#unified-official-pane .kf-composer .attachment-draft-copy span { color: #8d9ca5; }
#unified-official-pane .kf-messages .attachment-open { min-height: 34px; border-radius: 6px; color: #4d6a79; background: #fff; border-color: #e1e8ec; }
#unified-official-pane .kf-messages .voice-play { background: #f2f7f4; border-color: #d2e3d8; color: #47765c; border-radius: 7px; }
#unified-official-pane .kf-messages .attachment-bytes, #unified-official-pane .kf-messages .attachment-status { color: #8c9aa3; font-size: 10px; }

#unified-official-pane .kf-details-panel { flex: 0 0 270px; width: 270px; min-width: 0; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 20px 24px; background: #fff; border-left: 1px solid var(--kf-line); scrollbar-width: thin; scrollbar-color: #d8e0e5 transparent; }
#unified-official-pane .kf-details-panel[hidden] { display: none !important; }
#unified-official-pane .kf-details-heading { display: flex; align-items: center; justify-content: space-between; min-height: 58px; gap: 10px; border-bottom: 1px solid #edf0f3; margin-bottom: 22px; }
#unified-official-pane .kf-details-heading h3, #unified-official-pane .kf-details-heading strong { font-size: 13px; font-weight: 600; color: #657681; }
#unified-official-pane .kf-details-heading button { width: 30px; min-height: 30px; padding: 6px; border: 0; border-radius: 6px; background: transparent; color: #94a0a9; }
#unified-official-pane .kf-details-heading button:hover { background: #f3f6f8; color: #536875; }
#unified-official-pane .kf-contact-card { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 0 0 22px; text-align: center; }
#unified-official-pane .kf-contact-card .avatar { width: 48px; height: 48px; min-width: 48px; border-radius: 13px; font-size: 17px; background: #edf4ef; color: #638573; }
#unified-official-pane .kf-contact-card h3 { margin: 0; max-width: 100%; font-size: 14px; font-weight: 600; line-height: 1.6; color: #31454f; overflow-wrap: anywhere; }
#unified-official-pane .kf-contact-card>span:not(.avatar) { color: #96a1a9; font-size: 11px; }
#unified-official-pane .kf-detail-section { padding: 17px 0; border-top: 1px solid #edf0f3; }
#unified-official-pane .kf-detail-section>label, #unified-official-pane .kf-detail-section>span { display: block; margin: 0 0 7px; color: #96a1a9; font-size: 11px; }
#unified-official-pane .kf-detail-section>strong { display: block; margin: 0; font-size: 12px; font-weight: 500; color: #556976; }
#unified-official-pane #kf-owner-label { padding: 0; background: transparent; border-radius: 0; color: #556976; font-size: 12px; }
#unified-official-pane .kf-details-panel .kf-assign-controls { display: flex; flex-direction: column; align-items: stretch; gap: 8px; padding: 17px 0; border-top: 1px solid #edf0f3; border-bottom: 0; font-size: 12px; }
#unified-official-pane .kf-details-panel .kf-assign-controls>label { color: #96a1a9; font-size: 11px; }
#unified-official-pane .kf-details-panel .kf-assign-controls select { flex: none; width: 100%; max-width: none; min-height: 35px; border-radius: 6px; border-color: #e1e7ec; color: #536875; background: #fafcfd; font-size: 12px !important; }
#unified-official-pane .kf-details-panel .kf-assign-controls button { min-height: 34px; padding: 7px 10px; border-radius: 6px; color: #607884; border-color: #e1e7ec; font-size: 12px !important; }
#unified-official-pane .kf-details-panel .kf-assign-controls span { display: block; font-size: 10px; color: #9aa5ad; line-height: 1.65; }
#unified-official-pane .kf-details-panel .kf-state-note { padding: 12px 0; margin: 0; border-top: 1px solid #edf0f3; background: transparent; color: #8e9ca6; font-size: 11px; line-height: 1.75; }
#unified-official-pane .kf-reply-options { position: relative; margin-right: auto; color: #8b98a1; font-size: 11px; }
#unified-official-pane .kf-reply-options summary { list-style: none; cursor: pointer; padding: 7px 2px; user-select: none; }
#unified-official-pane .kf-reply-options summary::-webkit-details-marker { display: none; }
#unified-official-pane .kf-reply-options summary::after { content: '⌄'; display: inline-block; margin-left: 5px; color: #a3adb5; }
#unified-official-pane .kf-reply-options[open] summary { color: #5c7768; }
#unified-official-pane .kf-reply-options>div { position: absolute; left: 0; bottom: calc(100% + 4px); width: max-content; min-width: 210px; max-width: calc(100vw - 48px); padding: 10px 12px; border: 1px solid #e1e8ec; border-radius: 8px; background: #fff; box-shadow: 0 4px 16px #263b3110; z-index: 3; color: #6e7e88; font-size: 11px; }
#unified-official-pane .kf-reply-options:not([open])>div { display: none; }
#unified-official-pane .kf-reply-options>div>.kf-confirm-option { display: flex; align-items: center; min-height: 32px; padding: 2px 0; margin: 0; color: #6e7e88; font-size: 11px; white-space: nowrap; }
#unified-official-pane .kf-reply-options #kf-reply-help { display: block !important; margin: 6px 0 0; padding: 7px 0 0; border-top: 1px solid #edf0f3; color: #9aa5ad; font-size: 10px; line-height: 1.6; white-space: nowrap; }
#unified-official-pane .kf-confirm-option input { accent-color: var(--kf-green); }
#unified-official-pane .kf-detail-refresh { width: 100%; min-height: 34px; margin-top: 6px; padding: 7px 10px; border-color: #e1e7ec; border-radius: 6px; color: #6e818c; background: #fff; font-size: 11px !important; }
#workbench .incoming-banner { margin: 10px 16px 0; padding: 12px 16px; border-radius: 8px; background: #eff8f2; border-color: #c8dfd0; box-shadow: none; }

/* Legacy chats share the calmer palette and spacing, retaining every tool. */
#workbench #unified-legacy-pane .chat-heading { min-height: 74px; background: #fff; border-bottom-color: var(--line); }
#workbench #unified-legacy-pane .chat-heading h2 { font-size: 16px; color: #26343e; }
#workbench #unified-legacy-pane .transcript-area, #workbench #unified-legacy-pane .transcript-tools { background: #f8fafb; }
#workbench #unified-legacy-pane .messages { padding: 24px 28px; }
#workbench #unified-legacy-pane .bubble { border-color: #e5eaed; color: #344550; line-height: 1.8; }
#workbench #unified-legacy-pane .outgoing .bubble { background: #e4f2e9; border-color: #d5e8dc; color: #284b3e; }
#workbench #unified-legacy-pane .composer { background: #fff; border-top-color: var(--line); }
#workbench #details { width: 270px; padding: 20px; border-left-color: var(--line); }

/* The sign-in form keeps its original fields and guidance. */
#login { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); background: #f8fafb; }
#login .login-intro { padding: 40px 12%; background: #f1f5f3; }
#login .brandmark { width: 34px; height: 34px; font-size: 21px; border-radius: 9px; background: #16765e; }
#login .brand strong { font-size: 17px; color: #2b3b46; }
#login .brand small { font-size: 9px; letter-spacing: 1px; color: #8b999f; }
#login .intro-copy { padding: 48px 0; max-width: 390px; }
#login .intro-copy .eyebrow { font-size: 9px; letter-spacing: 1.5px; color: #85988e; }
#login .intro-copy h1 { margin: 16px 0; font-size: 30px; line-height: 1.55; letter-spacing: -.5px; color: #354b40; }
#login .intro-copy>p { font-size: 13px; color: #84938b; }
#login .intro-card { margin-top: 28px; padding: 15px; border-radius: 9px; box-shadow: none; border-color: #e1e8e4; }
#login .intro-card p { font-size: 13px; color: #4d6357; }
#login .intro-reply { padding: 13px 16px; border-radius: 9px; background: #e1efe6; border-color: #d4e5dc; box-shadow: none; font-size: 13px; color: #4e705d; }
#login .intro-foot { font-size: 10px; letter-spacing: .3px; color: #9ba8a0; }
#login .login-side { background: #fff; padding: 40px; }
#login .login-card { width: min(340px, 100%); }
#login .login-kicker { font-size: 9px; color: #7e978b; letter-spacing: 1.7px; }
#login .login-card h2 { font-size: 24px; line-height: 1.5; margin: 12px 0 5px; color: #293a44; }
#login .login-card>p.muted { color: #8b969f; margin-bottom: 25px; font-size: 12px; }
#login .login-card label { font-size: 12px; color: #637580; margin-top: 18px; }
#login .login-card input { min-height: 46px; border-color: #dde5ea; border-radius: 7px; font-size: 14px; color: #344550; }
#login .login-submit { margin-top: 25px; border-radius: 7px; background: #16765e; border-color: #16765e; font-size: 13px; }
#login .login-submit:hover:not(:disabled) { background: #105c49; }
#login .login-tip { border-top-color: #e7ebee; color: #8f9ba4; font-size: 10px; }
#login .version-label { font-size: 9px; letter-spacing: 1px; color: #a9b1b8; }

@media (max-width: 1100px) {
  #workbench .topbar .workspace-name { display: none; }
  #workbench .header-actions { gap: 6px; }
  #unified-official-pane .kf-heading { padding-left: 20px; padding-right: 20px; }
  #unified-official-pane .kf-transcript { padding-left: 22px; padding-right: 22px; }
  #unified-official-pane .kf-composer { padding-left: 20px; padding-right: 20px; }
  #unified-official-pane .kf-details-panel { position: absolute; top: 0; right: 0; bottom: 0; z-index: 6; box-shadow: -12px 0 30px #23374812; }
  #workbench .workspace.details-open { grid-template-columns: 300px minmax(0, 1fr); }
}
@media (max-width: 760px) {
  #login { display: block; background: #fff; }
  #login .login-intro { padding: 24px; background: #fff; }
  #login .intro-copy, #login .intro-foot { display: none; }
  #login .login-side { padding: 24px 28px; min-height: calc(100dvh - 98px); align-items: start; }
  #login .login-card { padding-top: 8px; }
  #login .login-card input { font-size: 16px; }
  #workbench .topbar { height: auto; min-height: 58px; flex-wrap: wrap; padding: 10px 12px; gap: 8px; }
  #workbench .topbar .brand strong { font-size: 15px; }
  #workbench .topbar .brandmark { width: 26px; height: 26px; font-size: 17px; }
  #workbench .header-actions { flex: 1; width: auto; justify-content: flex-end; gap: 5px; }
  #workbench .admin-avatar, #workbench .admin-label { display: none; }
  #workbench .header-actions button, #workbench .workbench-menu summary { min-height: 36px; font-size: 11px; }
  #workbench .reception-bar { min-height: 34px; gap: 15px; padding: 5px 12px; }
  #workbench .reception-stat { gap: 4px; font-size: 10px; }
  #workbench .reception-stat b { font-size: 12px; }
  #workbench .workspace, #workbench .workspace.details-open { display: block; position: relative; }
  #workbench .sidebar, #workbench .chat-panel { height: 100%; }
  #workbench .sidebar { border-right: 0; }
  #workbench:not(.chat-open) .chat-panel { display: none; }
  #workbench.chat-open .sidebar { display: none; }
  #workbench.chat-open #unified-official-pane:not([hidden]), #workbench.chat-open #unified-legacy-pane:not([hidden]) { display: flex; }
  #workbench .mobile-only { display: grid; }
  #workbench .aside-heading { padding: 18px 18px 14px; }
  #workbench .search-box input { min-height: 42px; font-size: 16px; padding: 9px 8px; }
  #workbench .status-filter select { min-height: 40px; font-size: 14px; }
  #workbench .list-tabs { gap: 23px; padding-top: 12px; }
  #workbench .list-tabs .tab { min-height: 44px; padding-top: 10px; }
  #workbench .auto-switch { min-height: 32px; }
  #unified-official-pane .kf-heading { min-height: 61px; gap: 8px; padding: 8px 12px; }
  #unified-official-pane .kf-heading h2 { font-size: 14px; line-height: 1.45; }
  #unified-official-pane #kf-back-list { min-width: 36px; width: 36px; height: 44px; flex: none; font-size: 21px; }
  #unified-official-pane .kf-call-controls { gap: 3px; }
  #unified-official-pane .kf-call-controls button { min-width: 44px; min-height: 44px; padding: 10px 8px; font-size: 11px !important; }
  #unified-official-pane .kf-call-controls .icon-button { width: 44px; min-width: 44px; padding: 10px; }
  #unified-official-pane .kf-call-controls button svg { width: 18px; height: 18px; }
  #unified-official-pane .kf-transcript { padding: 18px 15px 22px; }
  #unified-official-pane .kf-messages { gap: 17px; }
  #unified-official-pane .kf-messages .message { max-width: 88%; }
  #unified-official-pane .kf-messages .bubble { padding: 9px 12px; font-size: 14px; }
  #unified-official-pane .kf-composer { padding: 9px 12px max(10px, env(safe-area-inset-bottom)); }
  #unified-official-pane .kf-composer-heading { margin-bottom: 3px; }
  #unified-official-pane .kf-composer .attachment-tools { gap: 5px; margin-bottom: 3px; }
  #unified-official-pane .kf-composer .attachment-tools button { min-height: 44px; padding: 9px 8px; font-size: 12px !important; }
  #unified-official-pane .kf-composer textarea { min-height: 70px; max-height: 130px; padding: 10px 12px; font-size: 16px !important; line-height: 1.5; }
  #unified-official-pane .kf-composer-tools { margin-top: 6px; }
  #unified-official-pane .kf-send-controls button { min-height: 44px; min-width: 86px; padding: 10px 16px; font-size: 13px !important; }
  #unified-official-pane .kf-reply-options summary { min-height: 44px; display: flex; align-items: center; padding: 8px 2px; }
  #unified-official-pane .kf-reply-options>div { padding: 8px 12px 12px; }
  #unified-official-pane .kf-reply-options>div>.kf-confirm-option { min-height: 44px; }
  #unified-official-pane .kf-composer-footer { margin-top: 4px; }
  #unified-official-pane .kf-reply-help { display: none; }
  #unified-official-pane .kf-pending { margin: 8px 12px; max-height: 180px; padding: 10px 12px; }
  #unified-official-pane .kf-pending-actions button { min-height: 44px; }
  #unified-official-pane .kf-composer .attachment-draft button { min-height: 44px; }
  #unified-official-pane .kf-messages .attachment-open, #unified-official-pane .kf-history-more { min-height: 44px; }
  #unified-official-pane .kf-details-panel { width: min(300px, 90vw); flex-basis: 300px; padding: 0 20px max(24px, env(safe-area-inset-bottom)); }
  #unified-official-pane .kf-details-heading { min-height: 60px; margin-bottom: 20px; }
  #unified-official-pane .kf-details-heading button { width: 44px; min-height: 44px; padding: 12px; }
  #unified-official-pane .kf-details-panel .kf-assign-controls select { min-height: 44px; font-size: 16px !important; }
  #unified-official-pane .kf-details-panel .kf-assign-controls button { min-height: 44px; font-size: 13px !important; }
  #unified-official-pane #kf-consumer-status.is-error, #unified-official-pane .kf-notice, #unified-official-pane .kf-send-warning { padding-left: 12px; padding-right: 12px; }
  #unified-official-pane .kf-detail-refresh { min-height: 44px; }
  #workbench #details { position: absolute; top: 0; bottom: 0; right: 0; width: min(300px, 90vw); z-index: 6; box-shadow: -12px 0 30px #23374812; }
  #workbench #unified-legacy-pane .messages { padding: 18px 15px; }
  #workbench #unified-legacy-pane textarea { font-size: 16px; }
  #workbench #unified-legacy-pane .chat-tools .text-button { min-height: 36px; }
}
@media (max-width: 520px) {
  #workbench .topbar { align-items: center; gap: 7px; }
  #workbench .header-actions { flex-basis: 100%; justify-content: space-between; }
  #workbench .header-actions button, #workbench .workbench-menu summary { min-height: 40px; }
  #workbench #invite-open { padding: 8px 10px; }
  #workbench #kf-entry-toggle { padding: 8px 10px; }
  #workbench .workbench-menu summary { padding: 8px; }
  #workbench #sync-status.bad { flex-basis: 100%; }
  #unified-official-pane .kf-call-controls button>span { display: none; }
  #unified-official-pane .kf-call-controls button { padding: 10px; }
  #unified-official-pane #kf-back-list { width: 32px; min-width: 32px; }
  #unified-official-pane .kf-heading { gap: 4px; padding-left: 8px; padding-right: 8px; }
  #unified-official-pane .kf-call-controls { gap: 0; }
}
@media (max-height: 650px) {
  #unified-official-pane .kf-heading { min-height: 57px; padding-top: 8px; padding-bottom: 8px; }
  #unified-official-pane .kf-composer { padding-top: 7px; padding-bottom: max(8px, env(safe-area-inset-bottom)); }
  #unified-official-pane .kf-composer textarea { min-height: 56px; max-height: 82px; }
  #unified-official-pane .kf-pending { max-height: 145px; }
  #unified-official-pane .kf-reply-help { display: none; }
}
@media (pointer: coarse) {
  #workbench .header-actions button, #workbench .workbench-menu summary, #workbench .workbench-menu-items button, #workbench #refresh-list, #workbench .unified-list-notice button { min-height: 44px; }
  #workbench #refresh-list { width: 44px; }
  #unified-official-pane .kf-call-controls button, #unified-official-pane .kf-send-controls button, #unified-official-pane .kf-pending-actions button { min-height: 44px; }
  #unified-official-pane .kf-composer textarea { font-size: 16px !important; }
}
@media (max-width: 600px) {
  #unified-official-pane .kf-pending[data-text-inline="true"]:not([hidden]) { margin: 5px 12px; padding: 5px 8px; gap: 4px 8px; }
  #unified-official-pane .kf-pending[data-text-inline="true"] .kf-pending-actions button { min-height: 44px; }
}

/* Internal customer notes. Inputs stay mounted while messages refresh. */
.customer-title-line{display:flex;align-items:center;gap:10px;min-width:0}.customer-title-line h1,.customer-title-line h2{min-width:0;margin:0}.customer-note-open{flex:none;border:0!important;background:#edf6f1!important;color:#23806a!important;border-radius:5px!important;padding:4px 8px!important;min-height:28px!important;font-size:12px!important;line-height:1.5}.customer-profile-form{display:flex;flex-direction:column;gap:8px;padding:18px 0;border-top:1px solid #edf0f3;font-size:12px}.customer-profile-intro{color:#8b98a2;line-height:1.7;margin-bottom:6px}.customer-profile-form label{font-weight:600;color:#526570}.customer-profile-form input,.customer-profile-form textarea{box-sizing:border-box;width:100%;min-width:0;border:1px solid #dce5e8;border-radius:6px;background:#fafcfd;color:#304651;font:inherit;line-height:1.6;padding:9px 10px;resize:vertical}.customer-profile-form input:focus,.customer-profile-form textarea:focus{outline:2px solid #21836d25;border-color:#21836d}.customer-profile-count{align-self:flex-end;color:#9aa5ae;font-size:10px;margin-top:-4px}.customer-profile-actions{display:flex;flex-wrap:wrap;gap:7px;margin-top:4px}.customer-profile-actions button{min-height:34px;padding:7px 10px;border:1px solid #dce5e8;border-radius:6px;font-size:12px;background:#fff;color:#607784}.customer-profile-actions .primary{color:white!important;background:#21836d!important;border-color:#21836d!important}.customer-profile-status{min-height:0;margin:0;font-size:11px;line-height:1.7;color:#21836d;overflow-wrap:anywhere}.customer-profile-status:empty{display:none}.customer-profile-status.is-error{color:#b74835}.customer-profile-panel{padding:12px 22px;background:#fff;border-bottom:1px solid #e1e9e6}.customer-profile-panel h2{margin:0;font-size:15px}.customer-profile-panel .customer-profile-form{max-width:560px}
@media(max-width:700px){.customer-note-open{min-width:40px!important;min-height:36px!important;padding:6px 8px!important}.customer-title-line{gap:6px}.customer-profile-form input,.customer-profile-form textarea{font-size:16px;min-height:44px}.customer-profile-actions button{min-height:44px;font-size:13px}.customer-profile-count{font-size:11px}.customer-profile-status{font-size:12px}.customer-profile-panel{padding:12px 16px}}

#unified-official-pane .kf-owner-summary { display: block; margin-top: 3px; color: #7b8b95; font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
#unified-official-pane .kf-owner-summary[hidden] { display: none; }

#workbench .item-owner.has-team { flex-basis: 100%; width: 100%; max-width: none; margin-left: 0; order: 2; text-align: left; }

.conversation-archive-action{font-size:11px!important;white-space:nowrap;color:#71848d!important;border-color:#e1e8eb!important;background:#fff!important}
.conversation-archive-action:disabled{opacity:.45;cursor:not-allowed}
#workbench .list-tabs{flex-wrap:wrap}
#filter-archived{white-space:nowrap}
.archive-view-note{margin:8px 14px;color:#8b98a2;font-size:11px;line-height:1.7}
@media(max-width:700px){.conversation-archive-action{min-height:36px!important;padding:6px 8px!important}.kf-heading .kf-call-controls{flex-wrap:wrap;gap:4px}}

.archive-label{font-size:10px;color:#8b98a2;white-space:nowrap}

/* Customer video messages share the attachment reader, separate from video calls. */
#unified-official-pane .attachment-message.video-message { width: min(320px, 68vw); }
#unified-official-pane .attachment-media-video { display: block; width: 100%; max-height: 360px; border-radius: 6px; background: #10221c; object-fit: contain; }
#unified-official-pane .attachment-media-video[hidden] { display: none; }

/* Read-only spreadsheet attachment preview. */
dialog.spreadsheet-viewer { width: min(100vw - 40px, 1060px); max-width: none; height: min(82dvh, 850px); max-height: none; padding: 18px; border: 1px solid #d7e3da; border-radius: 15px; color: #294939; background: #fff; box-shadow: 0 20px 90px #13291c35; box-sizing: border-box; }
dialog.spreadsheet-viewer[open] { display: flex; flex-direction: column; gap: 12px; }
dialog.spreadsheet-viewer::backdrop { background: #13271f80; }
.spreadsheet-toolbar { display: flex; flex: none; align-items: center; gap: 10px; }
.spreadsheet-toolbar h2 { margin: 0; flex: 1; min-width: 0; font: 600 15px/1.6 system-ui, sans-serif; overflow-wrap: anywhere; }
.spreadsheet-toolbar a,.spreadsheet-toolbar button { flex: none; min-height: 40px; padding: 9px 12px; border: 1px solid #d9e5dd; border-radius: 8px; background: #fff; color: #236447; font: 13px/1.5 system-ui, sans-serif; text-decoration: none; cursor: pointer; box-sizing: border-box; }
.spreadsheet-toolbar a:focus-visible,.spreadsheet-toolbar button:focus-visible,.spreadsheet-tools select:focus-visible,.spreadsheet-scroll:focus-visible { outline: 3px solid #a2d6bb; outline-offset: 2px; }
.spreadsheet-tools { display: flex; flex: none; align-items: center; gap: 9px; font-size: 12px; color: #667d6d; }
.spreadsheet-tools select { max-width: min(100%, 360px); min-width: 130px; min-height: 38px; padding: 7px 10px; border: 1px solid #dce6df; border-radius: 7px; color: #2f5940; background: #fff; font: 13px system-ui, sans-serif; }
.spreadsheet-status,.spreadsheet-hint { margin: 0; flex: none; font: 12px/1.7 system-ui, sans-serif; color: #798474; }
.spreadsheet-status:empty { display: none; }
.spreadsheet-scroll { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; border: 1px solid #e0e8e2; border-radius: 8px; background: #fff; }
.spreadsheet-table { width: max-content; min-width: 100%; border-collapse: separate; border-spacing: 0; font: 12px/1.5 system-ui, sans-serif; color: #2c4636; }
.spreadsheet-table th,.spreadsheet-table td { height: 32px; min-width: 100px; max-width: 340px; padding: 6px 10px; border-right: 1px solid #e4ebe6; border-bottom: 1px solid #e4ebe6; white-space: pre; overflow: hidden; text-overflow: ellipsis; text-align: left; font-weight: 400; }
.spreadsheet-table tr>th:first-child { position: sticky; left: 0; z-index: 2; min-width: 55px; width: 55px; text-align: center; color: #778e7d; background: #f5f8f5; }
.spreadsheet-table .spreadsheet-columns th { position: sticky; top: 0; z-index: 4; height: 32px; padding-top: 5px; padding-bottom: 5px; color: #718878; background: #edf4ee; text-align: center; }
.spreadsheet-table .spreadsheet-first-row td,.spreadsheet-table .spreadsheet-first-row th { position: sticky; top: 32px; z-index: 3; background: #f7faf7; color: #315c42; font-weight: 600; }
.spreadsheet-table .spreadsheet-columns th:first-child,.spreadsheet-table .spreadsheet-first-row th:first-child { z-index: 5; }
.spreadsheet-table tbody tr:nth-child(even) td { background: #fcfdfc; }
@media (max-width: 650px) { dialog.spreadsheet-viewer { position: fixed; inset: 0; width: 100vw; height: 100dvh; margin: 0; padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom)); border: 0; border-radius: 0; } .spreadsheet-toolbar { flex-wrap: wrap; } .spreadsheet-toolbar h2 { flex-basis: 100%; font-size: 14px; } .spreadsheet-tools select { flex: 1; min-width: 0; max-width: none; } }
