body.chat-view-active {
  overflow: hidden;
}

body.chat-view-active .topbar {
  display: none !important;
}

body.chat-view-active .app main {
  height: 100dvh;
  overflow: hidden;
}

body.chat-view-active .content {
  height: 100dvh !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden;
  background: #f3f5f3;
}

body.chat-view-active .workchat-shell {
  height: 100dvh !important;
  margin: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  border-width: 0 0 0 1px !important;
}

body.chat-view-active .workchat-sidebar,
body.chat-view-active .workchat-main,
body.chat-view-active .workchat-conversation,
body.chat-view-active .workchat-center {
  height: 100%;
  min-height: 0;
}

body.chat-view-active .workchat-list,
body.chat-view-active .workchat-messages {
  overflow-y: auto;
  overscroll-behavior: contain;
}

body.chat-view-active .workchat-messages {
  scrollbar-gutter: stable;
  padding-bottom: 18px;
}

body.chat-view-active .workchat-compose textarea {
  resize: vertical !important;
  min-height: 72px !important;
  max-height: 220px !important;
  overflow: auto;
}

button.workchat-avatar,
.conversation-member-avatar {
  border: 0 !important;
  padding: 0 !important;
  cursor: pointer;
}

button.workchat-avatar:hover,
.conversation-member-avatar:hover {
  box-shadow: 0 0 0 3px rgba(36, 91, 77, .12);
  transform: translateY(-1px);
}

.conversation-member-avatar {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border-radius: 8px;
  background: var(--mint);
  color: var(--green);
  display: grid;
  place-items: center;
  font-size: 9px;
  font-style: normal;
  font-weight: 850;
}

.conversation-member .conversation-member-avatar {
  border: 0 !important;
  background: var(--mint) !important;
  color: var(--green) !important;
  padding: 0 !important;
}

.conversation-member-avatar.ai {
  background: #f2c76e;
  color: var(--green);
  overflow: hidden;
}

.conversation-member .conversation-member-avatar.ai {
  background: #f2c76e !important;
  color: var(--green) !important;
}

.conversation-member-avatar img,
.colleague-card-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.colleague-card-head {
  display: flex;
  align-items: center;
  gap: 18px;
}

.colleague-card-avatar {
  width: 78px;
  height: 78px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  background: var(--green);
  color: #fff;
  font-size: 24px;
  font-weight: 900;
  overflow: hidden;
  box-shadow: 0 14px 35px rgba(23, 63, 53, .16);
}

.colleague-contact {
  background: var(--paper);
  border: 1px solid #e4ddcc;
  border-radius: 13px;
  padding: 13px 15px;
  color: #6d6a61;
  font-size: 12px;
  margin-bottom: 14px;
}

.colleague-score-grid {
  display: grid;
  gap: 10px;
}

.colleague-score-grid.main {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 14px;
}

.colleague-score-grid.detail {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.colleague-score-grid div {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 13px;
}

.colleague-score-grid span,
.colleague-score-grid small {
  display: block;
  color: var(--muted);
  font-size: 10px;
}

.colleague-score-grid strong {
  display: block;
  color: var(--green);
  font-size: 22px;
  margin: 5px 0 2px;
}

#issue-modal.compact-colleague-modal .modal-backdrop {
  background: rgba(13, 25, 21, .16);
  backdrop-filter: none;
}

#issue-modal.compact-colleague-modal .modal-panel {
  width: 280px !important;
  right: 22px !important;
  top: 82px !important;
  bottom: auto !important;
  max-height: none !important;
  border-radius: 18px !important;
  overflow: hidden !important;
  background: #fff !important;
  box-shadow: 0 24px 70px rgba(13, 25, 21, .22) !important;
}

#issue-modal.compact-colleague-modal .modal-close {
  position: absolute !important;
  top: 9px !important;
  right: 9px !important;
  margin: 0 !important;
  padding: 4px 7px !important;
  border-radius: 999px !important;
  font-size: 10px !important;
  background: rgba(255, 255, 255, .88) !important;
}

.mini-colleague-card {
  padding: 15px;
  background: #fff;
}

.mini-colleague-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-right: 38px;
}

.mini-colleague-avatar {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 13px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--green);
  color: #fff;
  font-size: 15px;
  font-weight: 900;
}

.mini-colleague-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.mini-colleague-top strong {
  display: block;
  font-size: 13px;
  line-height: 1.35;
  color: var(--green);
}

.mini-colleague-top span,
.mini-colleague-card p {
  display: block;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.mini-colleague-score {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--green), #245b4d);
  color: #fff;
}

.mini-colleague-score span {
  color: rgba(255, 255, 255, .76);
  font-size: 10px;
  font-weight: 800;
}

.mini-colleague-score b {
  font-size: 24px;
  line-height: 1;
}

.workchat-thread {
  cursor: pointer;
}

.workchat-thread-actions {
  position: absolute;
  right: 7px;
  bottom: 7px;
  display: flex;
  gap: 4px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s ease;
}

.workchat-thread:hover .workchat-thread-actions,
.workchat-thread.active .workchat-thread-actions {
  opacity: 1;
  pointer-events: auto;
}

.workchat-thread:hover > b,
.workchat-thread.active > b {
  opacity: 0;
}

.workchat-thread-actions button {
  border: 1px solid #dbe7e1;
  background: rgba(255, 255, 255, .95);
  color: var(--green);
  border-radius: 999px;
  padding: 3px 7px;
  font-size: 8px;
  line-height: 1;
  font-weight: 850;
  box-shadow: 0 4px 12px rgba(23, 63, 53, .08);
}

.workchat-thread-actions button:hover {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.workchat-thread-actions button[data-chat-hide] {
  color: #9e3535;
  border-color: #efd4d0;
}

.workchat-thread-actions button[data-chat-hide]:hover {
  background: #9e3535;
  border-color: #9e3535;
  color: #fff;
}

.workchat-thread.pinned-thread::before {
  content: "置顶";
  position: absolute;
  left: 8px;
  top: 4px;
  padding: 2px 5px;
  border-radius: 999px;
  background: #fff4cf;
  color: #a67509;
  font-size: 8px;
  font-weight: 900;
}

.workchat-thread.pinned-thread {
  padding-top: 18px;
}

.workchat-thread.hidden-thread {
  background: #f2f5f4;
  border-left: 3px solid #a8b4af;
}

.workchat-thread.hidden-thread:hover,
.workchat-thread.hidden-thread.active {
  background: #e8efec;
}

.workchat-thread.hidden-thread small {
  color: #4d6c61;
  font-weight: 800;
}

.workchat-thread-actions button[data-chat-restore] {
  background: #e8fff5;
  color: #147a50;
}

.workchat-thread-actions button[data-chat-restore]:hover {
  background: #147a50;
  color: #fff;
}

.remember-login {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 8px;
  margin: -2px 0 4px;
  color: #36564d;
  font-size: 12px;
  font-weight: 800;
}

.remember-login input {
  width: 15px;
  height: 15px;
  accent-color: #1e6b57;
}

.remember-login span {
  line-height: 1;
}

.app-download-head p {
  max-width: 620px;
}

.chat-app-downloads-hot {
  position: relative;
  border: 0 !important;
  background: linear-gradient(135deg, #ff3b30, #d71920) !important;
  color: #fff !important;
  font-weight: 950 !important;
  letter-spacing: .04em;
  box-shadow: 0 10px 24px rgba(215, 25, 32, .28), 0 0 0 3px rgba(255, 59, 48, .12) !important;
  animation: appDownloadPulse 1.6s ease-in-out infinite;
}

.chat-app-downloads-hot::after {
  content: "新";
  position: absolute;
  top: -9px;
  right: -8px;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #ffe066;
  color: #b00020;
  font-size: 10px;
  font-weight: 950;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .16);
}

@keyframes appDownloadPulse {
  0%, 100% {
    transform: translateY(0);
    box-shadow: 0 10px 24px rgba(215, 25, 32, .28), 0 0 0 3px rgba(255, 59, 48, .12);
  }
  50% {
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(215, 25, 32, .38), 0 0 0 5px rgba(255, 59, 48, .18);
  }
}

.app-download-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.app-download-card {
  display: flex;
  min-height: 160px;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  color: var(--green);
  text-decoration: none;
  box-shadow: 0 12px 34px rgba(23, 63, 53, .08);
}

.app-download-card:hover {
  transform: translateY(-2px);
  border-color: rgba(36, 91, 77, .35);
  box-shadow: 0 20px 48px rgba(23, 63, 53, .12);
}

.app-download-card strong {
  font-size: 17px;
}

.app-download-card span {
  color: #55635d;
  font-size: 12px;
  line-height: 1.55;
}

.app-download-card small {
  color: var(--muted);
  font-size: 10px;
}

.app-download-card b {
  align-self: flex-start;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  font-size: 11px;
}

.app-download-note {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff8df;
  color: #80621d;
  font-size: 12px;
  line-height: 1.7;
}

body.chat-view-active.mobile-chat-only .app,
body.chat-view-active.mobile-chat-only .app main {
  height: 100dvh;
  min-height: 100dvh;
}

body.chat-view-active.mobile-chat-only .content,
body.chat-view-active.mobile-chat-only .workchat-shell {
  height: 100dvh !important;
}

body.chat-view-active.mobile-chat-only .workchat-compose textarea {
  resize: vertical !important;
  min-height: 50px !important;
  max-height: 180px !important;
  overflow: auto;
}

body.chat-view-active.chat-minimized .content {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #173f35, #0f2a24);
}

body.chat-view-active.chat-minimized .content::before {
  content: "内部沟通已最小化";
  display: grid;
  place-items: center;
  width: min(360px, 78vw);
  min-height: 120px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 22px;
  color: rgba(255, 255, 255, .76);
  font-weight: 800;
  background: rgba(255, 255, 255, .06);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .18);
}

body.chat-view-active.chat-minimized .workchat-shell {
  display: none !important;
}

body.chat-view-active.chat-minimized .chat-floating-entry {
  right: 28px;
  bottom: 24px;
  border-radius: 22px;
  padding: 14px 18px;
  box-shadow: 0 22px 70px rgba(23, 63, 53, .38);
}

body.chat-phone-manual .app main {
  height: 100dvh !important;
}

@media (max-width: 760px) {
  body.chat-view-active .app main,
  body.chat-view-active .content,
  body.chat-view-active .workchat-shell {
    height: 100dvh !important;
  }

  body.chat-view-active .workchat-shell {
    border-left: 0 !important;
  }

  body.chat-view-active .workchat-compose textarea {
    min-height: 48px !important;
    max-height: 160px !important;
  }

  .colleague-score-grid.main,
  .colleague-score-grid.detail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app-download-grid {
    grid-template-columns: 1fr;
  }
}
