.brand .office-chat-open{display:inline-flex;align-items:center;gap:6px;white-space:nowrap;min-height:42px;padding:10px 12px!important;border:1px solid #248b76!important;background:#105e50!important;color:#fff!important}
.brand .office-chat-open:hover,.brand .office-chat-open.active{background:#0a7460!important;border-color:#61bea9!important}
.brand .office-chat-open:focus-visible{outline:2px solid #45ac98;outline-offset:3px}
.office-chat-open .team-chat-badge{background:#fff;color:#105e50}
.office-chat-open[hidden]{display:none}
.office-chat{--office-chat-color:#0f6a58;--chat-soft:color-mix(in srgb,var(--office-chat-color) 14%,var(--card))}
.office-chat .team-chat-heading{margin-top:0}
.office-chat .team-chat-heading>div{border-left:4px solid #20927a;padding-left:10px}
.office-chat .team-chat-status:empty{display:none}
.office-chat .team-chat-frame,.office-chat .team-chat-compose{border-color:color-mix(in srgb,#20927a 45%,var(--line))}
.office-chat .is-mine>.team-chat-bubble{border-color:color-mix(in srgb,#20927a 40%,var(--line))}
.office-chat .team-chat-compose-bottom{justify-content:flex-end}
.office-chat-compose-room{display:inline-block;margin:0 0 8px;padding:4px 8px;border-radius:6px;background:var(--office-chat-color);color:#fff;font-size:12px;font-weight:650}
.office-chat-pickers{display:flex;gap:5px;flex-wrap:wrap;min-width:0}
.office-chat-pickers .chip{min-height:42px;padding:8px 10px;font-size:12px;white-space:nowrap}
.office-chat .team-chat-send{margin-left:auto;background:#105e50!important;border-color:#248b76!important;color:#fff!important}
.office-chat .team-chat-compose-files:not(:empty){max-height:180px;overflow-y:auto;margin-bottom:8px}
.office-chat-draft-photo{width:42px;height:42px;object-fit:cover;border-radius:6px;flex:none}
.office-chat .team-chat-attachment .office-chat-photo{display:block;width:auto;max-width:min(100%,420px);max-height:330px}
.office-chat .team-chat-reply-preview,.office-chat .team-chat-compose-reply{border-left-color:var(--office-chat-color)}
.office-chat .team-chat-reply-preview,.office-chat .team-chat-text-action,.office-chat .team-chat-remove{cursor:pointer}
.office-chat .team-chat-message:focus{outline:none}
.office-chat .team-chat-message:focus>.team-chat-bubble{outline:2px solid #20927a;outline-offset:2px}
.office-chat .office-chat-quote-gap{align-self:center;max-width:100%;padding:5px 8px;border:1px dashed var(--line);border-radius:8px;background:transparent;color:var(--muted);font-size:11px;cursor:pointer}
body.office-chat-screen #workflowNavigationZone,body.office-chat-screen #workflowQueuesZone,body.office-chat-screen #desktopShortcuts,body.office-chat-screen #managerTaskShortcuts,body.office-chat-screen #employeeHome{display:none!important}
body.office-chat-screen .workspace-navigation{position:static!important;top:auto!important;margin:0 0 10px!important}
@media(max-width:550px){
  .workspace-header-chats > #officeChatOpen{font-size:12px}
  .office-chat .team-chat-heading h1{font-size:22px}
  .office-chat .team-chat-text-label textarea{min-height:54px}
  .office-chat .team-chat-send{padding-left:16px!important;padding-right:16px!important}
}

.brand .crm-help-open {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 42px;
  padding: 10px 12px;
  white-space: nowrap;
  border-color: color-mix(in srgb, #5472ff 50%, var(--line));
  background: color-mix(in srgb, #5472ff 13%, var(--card));
}
.brand .crm-help-open:hover { background: color-mix(in srgb, #5472ff 22%, var(--card)); }
.brand .crm-help-open[hidden] { display: none; }
.crm-help-mark {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  background-color: #5472ff;
  -webkit-mask: var(--cm-deepseek-mark) center / contain no-repeat;
  mask: var(--cm-deepseek-mark) center / contain no-repeat;
}
.crm-help-dialog {
  box-sizing: border-box;
  width: min(670px, calc(100% - 24px));
  height: min(700px, calc(100dvh - 24px));
  max-width: none;
  max-height: none;
  padding: 0;
  overflow: hidden;
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.crm-help-dialog[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.crm-help-dialog::backdrop { background: rgb(0 0 0 / .63); }
.crm-help-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 17px;
  border-bottom: 1px solid var(--line);
}
.crm-help-header .crm-help-mark { width: 28px; height: 28px; flex-basis: 28px; }
.crm-help-title { flex: 1 1 auto; min-width: 0; }
.crm-help-title h2 { margin: 0; font-size: clamp(17px, 4vw, 21px); }
.crm-help-title p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.crm-help-close { flex: none; min-height: 42px; }
.crm-help-frame {
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 15px 17px;
  background: color-mix(in srgb, var(--bg) 70%, var(--card));
}
.crm-help-suggestions { display: flex; flex-wrap: wrap; gap: 8px; }
.crm-help-suggestions[hidden] { display: none; }
.crm-help-suggestions p { flex: 1 1 100%; color: var(--muted); margin: 0 0 4px; font-size: 14px; }
.crm-help-suggestions button { width: auto; max-width: 100%; min-height: 40px; text-align: left; }
.crm-help-log { display: flex; flex-direction: column; gap: 12px; }
.crm-help-message {
  align-self: flex-start;
  min-width: 0;
  max-width: min(95%, 550px);
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 5px 13px 13px;
  background: var(--card);
}
.crm-help-message.is-question {
  align-self: flex-end;
  max-width: 85%;
  border-radius: 13px 5px 13px 13px;
  background: color-mix(in srgb, #5472ff 11%, var(--card));
}
.crm-help-message strong { font-size: 12px; color: var(--muted); }
.crm-help-message p {
  margin: 5px 0 0;
  line-height: 1.5;
  font-size: 14px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.crm-help-link {
  width: fit-content;
  max-width: 100%;
  margin-top: 8px;
  min-height: 40px;
  text-align: left;
}
.crm-help-compose {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 12px 17px;
  border-top: 1px solid var(--line);
  background: var(--card);
}
.crm-help-compose label { margin: 0; }
.crm-help-compose textarea { width: 100%; height: 62px; min-height: 62px; margin: 0; resize: none; }
.crm-help-notice { margin: 0; color: var(--muted); font-size: 13px; }
.crm-help-notice:empty { display: none; }
.crm-help-notice[data-error="true"] { color: var(--error); }
.crm-help-actions { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.crm-help-actions > button { width: auto; min-height: 42px; }
.crm-help-actions > .primary { margin-inline-start: auto; }
@media (max-width: 550px) {
  .brand .crm-help-open { font-size: 12px; }
  .crm-help-dialog {
    width: calc(100% - 12px);
    height: min(760px, calc(100dvh - 12px));
    border-radius: 12px;
  }
  .crm-help-header, .crm-help-frame, .crm-help-compose { padding: 11px 12px; }
  .crm-help-header { gap: 8px; }
  .crm-help-header .crm-help-mark { width: 22px; height: 22px; flex-basis: 22px; }
}

.crm-help-launcher,
.crm-help-dialog.crm-help-dock {
  --crm-help-right: max(14px, calc(env(safe-area-inset-right, 0px) + 8px), calc(var(--tg-content-safe-area-inset-right, 0px) + 8px));
  --crm-help-bottom: calc(max(14px, calc(env(safe-area-inset-bottom, 0px) + 8px), calc(var(--tg-content-safe-area-inset-bottom, 0px) + 8px)) + var(--crm-help-keyboard, 0px));
  position: fixed;
  inset: auto var(--crm-help-right) var(--crm-help-bottom) auto;
  margin: 0;
}
.crm-help-launcher:not([hidden]) {
  display: flex;
  align-items: center;
  z-index: 40;
}
.crm-help-launcher.is-collapsed {
  right: max(env(safe-area-inset-right, 0px), var(--tg-content-safe-area-inset-right, 0px));
}
.crm-help-launcher .crm-help-launcher-toggle {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 2px;
  width: 32px;
  height: 44px;
  padding: 0;
  border-radius: 12px;
  background: var(--card);
  color: var(--text);
}
.crm-help-launcher:not(.is-collapsed) .crm-help-launcher-toggle {
  place-content: center end;
  padding-inline-end: 3px;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.crm-help-launcher:not(.is-collapsed) .crm-help-launcher-arrow {
  width: 7px;
  height: 7px;
  font-size: 0;
  border: solid currentColor;
  border-width: 1.5px 1.5px 0 0;
  transform: rotate(45deg);
}
.crm-help-launcher-toggle .crm-help-mark { display: none; }
.crm-help-launcher-arrow { font-size: 24px; line-height: 1; }
.crm-help-launcher.is-collapsed .crm-help-launcher-toggle {
  min-height: 48px;
  border-radius: 12px 0 0 12px;
  border-inline-end: 0;
  color: #fff;
  background: #4360d8;
}
.crm-help-launcher.is-collapsed .crm-help-launcher-toggle .crm-help-mark {
  display: block;
  width: 17px;
  height: 15px;
  background-color: #fff;
}
.crm-help-launcher.is-collapsed .crm-help-launcher-arrow { transform: rotate(180deg); font-size: 18px; }
.crm-help-floating:not([hidden]) {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  padding: 0;
  border: 1px solid #7790ff;
  border-radius: 50%;
  background: #4360d8;
  box-shadow: 0 4px 16px rgb(0 0 0 / .28);
}
.crm-help-floating:hover { background: #3652c7; }
.crm-help-floating:focus-visible { outline: 2px solid #7993ff; outline-offset: 3px; }
.crm-help-floating .crm-help-mark { width: 28px; height: 28px; background-color: #fff; }
.crm-help-dialog.crm-help-dock {
  width: min(448px, calc(100% - var(--crm-help-right) - 14px));
  height: min(620px, calc(100dvh - var(--crm-help-bottom) - 14px));
  box-shadow: 0 12px 36px rgb(0 0 0 / .24);
}
.crm-help-dialog.crm-help-dock::backdrop { background: rgb(0 0 0 / .24); }
body:has(#crmHelpFloating:not([hidden])) > main {
  padding-bottom: max(82px, calc(env(safe-area-inset-bottom, 0px) + 72px), calc(var(--tg-content-safe-area-inset-bottom, 0px) + 72px));
}
