/*
 * BQ WorkHub - Forest Graphite
 * Workplace theme: calm graphite framing, restrained forest green actions,
 * soft neutral work surfaces, amber attention and red only for destructive UI.
 */

:root {
  --ink: #151a17;
  --ink-soft: #343e38;
  --muted: #4f5b54;
  --surface: #ffffff;
  --surface-soft: #f5f6f7;
  --surface-quiet: #eef1f2;
  --line: #d3d8dc;
  --line-strong: #c3c9ce;
  --divider: #c7cdd1;
  --chat-canvas: #e9ecef;
  --teal: #197a5a;
  --teal-dark: #155c45;
  --teal-soft: #e8f4ee;
  --coral: #e3a33b;
  --danger: #d84a45;
  --success: #197a5a;
  --sidebar: #ffffff;
  --sidebar-soft: #e8efeb;
  --sidebar-text: #151a17;
  --sidebar-muted: #4f5b54;
  --taskbar-height: 56px;
  --forest: #197a5a;
  --forest-deep: #155c45;
  --forest-soft: #e8f4ee;
  --graphite: #151a17;
  --canvas: #e9ecef;
  --panel-neutral: #ffffff;
  --workspace-band-height: 56px;
  --section-title-size: 12px;
  --section-title-weight: 750;
  --amber: #e3a33b;
  --amber-soft: #fff6e5;
  --danger-soft: #fff0ef;
  --shadow-soft: 0 8px 24px rgba(32, 37, 34, .07);
  --shadow-float: 0 18px 48px rgba(32, 37, 34, .15);
}

html {
  color-scheme: light;
  font-size: 15px;
}

body.app-body,
body.auth-body {
  color: var(--graphite);
  background: var(--canvas);
  font-family: "Segoe UI Variable Text", "Segoe UI", Inter, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body.app-body {
  font-size: 15px;
}

::selection {
  color: #fff;
  background: rgba(25, 122, 90, .84);
}

a {
  color: var(--forest-deep);
}

button,
a,
input,
select,
textarea {
  transition: color 140ms ease, background-color 140ms ease,
    border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(25, 122, 90, .2);
  outline-offset: 2px;
}

/* Application frame */

.global-taskbar {
  min-height: var(--taskbar-height);
  padding: 0 14px 0 18px;
  color: #eef4f0;
  background: var(--graphite);
  border-bottom: 1px solid #303832;
  box-shadow: 0 2px 12px rgba(20, 25, 22, .16);
}

.global-taskbar::after {
  height: 2px;
  background: var(--forest);
}

.global-taskbar-brand,
.global-taskbar-brand:hover,
.global-taskbar-brand:focus-visible {
  color: #fff;
  font-size: 18px;
  font-weight: 760;
}

.global-taskbar-brand .rooms-brand-mark,
.rooms-brand-mark {
  color: #fff;
  background: var(--forest);
  border: 0;
  border-radius: 9px;
  box-shadow: none;
}

.global-taskbar .icon-button,
.global-taskbar .account-logout {
  color: #bec9c2;
}

.global-taskbar .icon-button:hover,
.global-taskbar .icon-button:focus-visible,
.global-taskbar .account-logout:hover {
  color: #fff;
  background: #303832;
  border-color: #3a463e;
}

.global-profile {
  color: #eef4f0;
  border: 1px solid transparent;
  border-radius: 9px;
}

.global-profile:hover,
.global-profile:focus-visible,
.global-profile.is-active {
  color: #fff;
  background: #2c332f;
  border-color: #3b453f;
}

.global-profile-copy strong {
  color: #f6f9f7;
  font-size: 13px;
}

.global-profile-copy small {
  color: #c2ccc6;
  font-size: 10.5px;
  text-transform: uppercase;
}

.global-profile .account-avatar,
.account-avatar,
.context-avatar {
  color: #fff;
  background: var(--forest);
}

.workhub-shell {
  grid-template-columns: 320px minmax(480px, 1fr) 320px;
  height: calc(100vh - var(--taskbar-height));
}

/* Left navigation */

.rooms-column {
  color: var(--sidebar-text);
  background: var(--sidebar);
  border-right: 1px solid var(--divider);
  box-shadow: none;
}

.rooms-brand-row {
  color: var(--graphite);
  background: #edf2ef;
  border-bottom-color: #d5dfd9;
}

.rooms-brand-row > strong,
.rooms-brand,
.rooms-brand:hover,
.rooms-brand:focus-visible {
  color: var(--graphite);
}

.workspace-nav {
  height: var(--workspace-band-height);
  gap: 4px;
  padding: 5px 8px;
  border-bottom-color: var(--divider);
}

.workspace-nav-item {
  min-height: 44px;
  color: #3f4c45;
  background: rgba(255, 255, 255, .62);
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 680;
}

.workspace-nav-item svg {
  width: 17px;
  height: 17px;
}

.workspace-nav-item:hover {
  color: var(--forest-deep);
  background: #fff;
  border-color: #d6ded9;
}

.workspace-nav-item.is-active {
  color: #fff;
  background: var(--forest);
  border-color: var(--forest);
  box-shadow: 0 3px 9px rgba(25, 122, 90, .14);
}

.rooms-list-region,
.admin-nav-region {
  padding: 12px 10px 16px;
  scrollbar-color: #bccbc2 transparent;
}

.chat-sidebar-search {
  margin-bottom: 14px;
  color: #526058;
  background: rgba(255, 255, 255, .82);
  border: 1px solid #d4ded8;
  border-radius: 9px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .7);
}

.chat-sidebar-search:focus-within {
  background: #fff;
  border-color: #75a993;
  box-shadow: 0 0 0 3px rgba(25, 122, 90, .1);
}

.chat-sidebar-search input {
  color: var(--graphite);
}

.chat-sidebar-search input::placeholder {
  color: #4f5b54;
  opacity: 1;
}

.rooms-list-heading,
.admin-nav-heading {
  color: #34413a;
  font-size: var(--section-title-size);
  font-weight: var(--section-title-weight);
  letter-spacing: .055em;
}

.rooms-list-heading small {
  color: var(--forest-deep);
  background: #dceae2;
}

.rooms-list {
  gap: 1px;
}

.room-list-item,
.chat-contact-button {
  min-height: 48px;
  padding: 4px 6px;
  color: var(--graphite);
  border: 1px solid transparent;
  border-radius: 9px;
}

.chat-sidebar-section-heading {
  padding-bottom: 5px;
}

.chat-group-section {
  margin-top: 11px;
  padding-top: 10px;
}

.room-list-item:hover,
.chat-contact-button:hover,
.chat-contact-button:focus-visible {
  color: var(--graphite);
  background: #edf4f0;
  border-color: #d2dfd8;
}

.room-list-item.is-active,
.room-list-item.is-my-chat:hover,
.room-list-item.is-my-chat.is-active {
  color: var(--graphite);
  background: #dcefe7;
  border-color: #b9d8c9;
  box-shadow: inset 3px 0 0 var(--forest);
}

.room-list-item.is-my-chat {
  background: rgba(255, 255, 255, .28);
}

.room-avatar {
  width: 34px;
  height: 34px;
  color: #fff;
  background: #6b8175;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .72);
}

.room-avatar.is-group {
  background: #4c6b5c;
  border-radius: 10px;
}

.room-avatar.is-my-chat {
  color: #fff;
  background: var(--forest);
}

.room-title-line strong {
  color: var(--graphite);
  font-size: 13.8px;
  font-weight: 670;
}

.room-title-line time,
.room-preview-line > span,
.room-list-item.is-muted .room-preview-line > span {
  color: #4f5b54;
  font-size: 11.5px;
}

.room-preview-line b,
.notification-toggle b {
  color: #fff;
  background: var(--danger);
}

.rooms-action-button {
  color: var(--forest-deep);
  background: rgba(255, 255, 255, .72);
  border-color: #d2ddd6;
  border-radius: 8px;
}

.rooms-action-button:hover {
  color: #fff;
  background: var(--forest);
  border-color: var(--forest);
}

.rooms-empty-state,
.chat-sidebar-no-results {
  color: #4f5b54;
  background: rgba(255, 255, 255, .34);
  border-color: #c5d1ca;
}

.rooms-empty-state svg {
  stroke: #769185;
}

.admin-section-nav a {
  color: #4f5e56;
  border: 1px solid transparent;
  border-radius: 8px;
}

.admin-section-nav a:hover {
  color: var(--forest-deep);
  background: rgba(255, 255, 255, .68);
  border-color: #d5dfd9;
}

.admin-section-nav a.is-active {
  color: var(--forest-deep);
  background: #fff;
  border-color: #d5dfd9;
  box-shadow: inset 3px 0 0 var(--forest);
}

.sidebar-account {
  color: var(--graphite);
  background: #e1e9e4;
  border-top-color: var(--divider);
}

.account-copy strong {
  color: var(--graphite);
}

.account-copy span,
.account-logout,
.rooms-close {
  color: #56635c;
}

.sidebar-profile-link:hover .account-copy strong,
.sidebar-profile-link:focus-visible .account-copy strong {
  color: var(--forest-deep);
}

.account-logout:hover,
.rooms-close:hover {
  color: var(--forest-deep);
  background: var(--forest-soft);
}

/* Main work surface */

.content-column {
  background: var(--canvas);
}

.content-header {
  height: var(--workspace-band-height);
  min-height: var(--workspace-band-height);
  padding: 6px clamp(16px, 2.1vw, 26px);
  background: #fff;
  border-bottom-color: var(--divider);
  box-shadow: none;
}

.content-title {
  gap: 1px;
}

.content-title-avatar {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  overflow: hidden;
  color: #fff;
  background: #6b8175;
  border: 1px solid #c7d2cc;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 750;
}

.content-title-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.content-title span {
  color: var(--forest-deep);
  font-size: var(--section-title-size);
  font-weight: var(--section-title-weight);
  letter-spacing: .045em;
}

.content-title h1 {
  color: var(--graphite);
  font-size: 20px;
  font-weight: 740;
}

.icon-button {
  border-radius: 8px;
}

.icon-button:hover,
.icon-button:focus-visible {
  color: var(--forest-deep);
  background: var(--forest-soft);
  border-color: #cee1d7;
}

.button-primary,
.notification-desktop-permission button,
.chat-send-button,
.login-submit,
.login-button {
  color: #fff;
  background: var(--forest);
  border-color: var(--forest);
  box-shadow: 0 5px 14px rgba(25, 122, 90, .16);
}

.button-primary:hover,
.notification-desktop-permission button:hover,
.chat-send-button:hover,
.login-submit:hover,
.login-button:hover {
  color: #fff;
  background: var(--forest-deep);
  border-color: var(--forest-deep);
}

.button-secondary {
  color: #46534c;
  background: #fff;
  border-color: var(--line-strong);
}

.button-secondary:hover {
  color: var(--forest-deep);
  background: var(--forest-soft);
  border-color: #a9c8b8;
}

.app-input,
.chat-form-field input,
.chat-form-field select,
.chat-form-field textarea,
.chat-context-field select,
.chat-add-member-form select,
.chat-task-form input,
.chat-task-form select,
.chat-task-form textarea {
  color: var(--graphite);
  background: #fff;
  border-color: var(--line-strong);
  border-radius: 8px;
}

.app-input:focus,
.chat-form-field input:focus,
.chat-form-field select:focus,
.chat-form-field textarea:focus,
.chat-context-field select:focus,
.chat-add-member-form select:focus,
.chat-task-form input:focus,
.chat-task-form select:focus,
.chat-task-form textarea:focus {
  border-color: #75a993;
  box-shadow: 0 0 0 3px rgba(25, 122, 90, .11);
}

.notification-popover,
.chat-thread-inbox,
.user-form,
.my-tasks-summary > div,
.my-task-card,
.workhub-modal {
  background: #fff;
  border-color: var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-float);
}

.notification-popover > header,
.notification-filters {
  background: #fff;
}

.notification-item:hover,
.notification-item.is-unread {
  background: #f1f8f4;
}

.notification-filters button:hover,
.notification-filters button.is-active {
  color: var(--forest-deep);
  background: var(--forest-soft);
  border-color: #cbe0d5;
}

/* Chat workspace */

.chat-workspace {
  grid-template-rows: auto minmax(0, 1fr) auto auto auto;
  background: var(--chat-canvas);
}

.chat-message-search {
  grid-row: 1;
}

.chat-history {
  grid-row: 2;
}

.chat-selection-toolbar {
  grid-row: 3;
}

.chat-reply-bar {
  grid-row: 4;
}

.chat-composer,
.chat-readonly-notice {
  grid-row: 5;
}

.chat-message-search:has(.chat-search-form[hidden]) {
  display: none;
}

.chat-message-search {
  min-height: 50px;
  padding: 8px clamp(16px, 3vw, 34px);
  background: #fff;
  border-bottom-color: var(--divider);
}

.chat-search-form input {
  color: var(--graphite);
  background: #fafcfb;
  border-color: var(--line-strong);
  border-radius: 8px;
}

.chat-search-form input:focus {
  border-color: #75a993;
  box-shadow: 0 0 0 3px rgba(25, 122, 90, .1);
}

.chat-search-form button,
.chat-search-more {
  color: var(--forest-deep);
  border-color: var(--line-strong);
  border-radius: 8px;
}

.chat-search-form button:hover,
.chat-search-more:hover {
  background: var(--forest-soft);
  border-color: #a8c9b8;
}

.chat-history {
  background: var(--chat-canvas);
  padding: 14px;
  scrollbar-color: #c8d3cc transparent;
}

.chat-message-list {
  padding-right: 0;
  padding-left: 0;
}

.chat-message {
  width: min(76%, 700px);
}

.chat-message-avatar {
  color: #fff;
  background: #667d71;
  box-shadow: 0 0 0 2px #fff;
}

.chat-message-meta strong {
  color: #243129;
  font-weight: 680;
}

.chat-message-meta time,
.chat-forwarded-label {
  color: #4f5b54;
}

.chat-message-bubble {
  color: var(--graphite);
  background: #fff;
  border-color: #c9d0d5;
  border-radius: 4px 13px 13px 13px;
  box-shadow: 0 3px 12px rgba(21, 26, 23, .09);
}

.chat-message.is-mine > .chat-message-stack > .chat-message-bubble {
  color: #193f31;
  background: #dcefe7;
  border-color: #b9d8c9;
  border-radius: 13px 4px 13px 13px;
  box-shadow: none;
}

.chat-message.is-highlighted > .chat-message-stack > .chat-message-bubble,
.chat-message.is-selected > .chat-message-stack > .chat-message-bubble {
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(227, 163, 59, .14);
}

.chat-message.is-failed > .chat-message-stack > .chat-message-bubble {
  color: #8f2e2a;
  background: var(--danger-soft);
  border-color: #efb7b4;
}

.chat-message-reply-preview,
.chat-thread-reply-reference {
  color: #405248;
  background: rgba(244, 247, 245, .88);
  border-color: var(--forest);
  border-radius: 7px;
}

.chat-message.is-mine > .chat-message-stack > .chat-message-bubble .chat-message-reply-preview,
.chat-message.is-mine > .chat-message-stack > .chat-message-bubble .chat-thread-reply-reference {
  background: rgba(255, 255, 255, .58);
  border-color: rgba(25, 122, 90, .55);
}

.chat-message-mention,
.chat-message.is-mine > .chat-message-stack > .chat-message-bubble .chat-message-mention {
  color: var(--forest-deep);
  background: rgba(25, 122, 90, .12);
}

.chat-file-attachment {
  background: #f7f9f7;
  border-color: #d7e0da;
  border-radius: 9px;
}

.chat-message.is-mine > .chat-message-stack > .chat-message-bubble .chat-file-attachment {
  color: #254b3c;
  background: rgba(255, 255, 255, .64);
  border-color: #c5dbcf;
}

.chat-message-controls > button,
.chat-message-menu,
.chat-reaction-picker {
  color: #46534b;
  background: #fff;
  border-color: var(--line);
  box-shadow: var(--shadow-soft);
}

.chat-message-controls > button:hover,
.chat-message-menu button:hover,
.chat-message-menu button:focus-visible {
  color: var(--forest-deep);
  background: var(--forest-soft);
}

.chat-message-reactions button.is-mine {
  color: var(--forest-deep);
  background: var(--forest-soft);
  border-color: #bdd9ca;
}

.chat-date-divider span,
.chat-load-older,
.chat-return-latest,
.chat-return-position,
.chat-new-messages {
  color: #536159;
  background: rgba(255, 255, 255, .94);
  border-color: var(--line);
  box-shadow: 0 4px 12px rgba(32, 37, 34, .06);
}

.chat-new-messages {
  color: #fff;
  background: var(--forest);
  border-color: var(--forest);
}

.chat-composer {
  position: relative;
  display: block;
  padding: 0;
  background: #fff;
  border-top-color: var(--divider);
  box-shadow: 0 -3px 12px rgba(32, 37, 34, .04);
}

.chat-composer-main {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.chat-input-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 42px minmax(58px, auto);
  gap: 0;
  background: #fff;
  border: 0;
  border-radius: 0;
}

.chat-input-shell:focus-within {
  background: #fff;
  border: 0;
  box-shadow: none;
}

.chat-composer textarea {
  grid-row: 2;
  min-height: 58px;
  padding: 16px 126px 13px 16px;
  color: var(--graphite);
  background: #fff;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.chat-composer textarea:focus {
  background: #fff;
  border: 0;
  box-shadow: none;
}

.chat-composer textarea::placeholder {
  color: #606c65;
  opacity: 1;
}

.chat-external-search-shell {
  background: #fff;
  border-color: var(--line-strong);
}

.chat-external-search-shell > span {
  color: #355347;
}

.chat-external-search-shell input {
  color: #202923;
}

.chat-external-search-shell input::placeholder {
  color: #65716a;
  opacity: 1;
}

.chat-composer-tools {
  grid-row: 1;
  min-height: 42px;
  padding: 4px 14px;
  border-bottom: 1px solid var(--divider);
}

.chat-composer-tools > button {
  width: 34px;
  height: 34px;
  color: #66736c;
  border-radius: 7px;
}

.chat-composer-tools > button:hover,
.chat-composer-tools > button:focus-visible {
  color: var(--forest-deep);
  background: var(--forest-soft);
}

.chat-composer-actions {
  position: absolute;
  z-index: 4;
  right: 14px;
  bottom: 10px;
}

.chat-send-button {
  display: grid;
  width: 40px;
  min-width: 40px;
  height: 40px;
  min-height: 40px;
  padding: 0;
  place-items: center;
  border-radius: 50%;
}

.chat-send-button span {
  display: none;
}

.chat-reply-bar,
.chat-selection-toolbar {
  background: #f1f8f4;
  border-color: #c9dfd3;
}

.chat-header-preferences button,
.chat-header-search-toggle {
  color: #5c6962;
  background: #fff;
  border-color: var(--line);
  border-radius: 8px;
}

.chat-header-preferences button:hover,
.chat-header-preferences button:focus-visible,
.chat-header-preferences button.is-active,
.chat-header-search-toggle:hover,
.chat-header-search-toggle:focus-visible {
  color: var(--forest-deep);
  background: var(--forest-soft);
  border-color: #bfd8cb;
}

/* Context panel */

.context-column {
  background: var(--panel-neutral);
  border-left-color: var(--divider);
}

.context-section {
  padding: 18px 17px;
  background: transparent;
  border-bottom-color: var(--divider);
}

.chat-context > .context-section:first-child {
  display: flex;
  min-height: var(--workspace-band-height);
  padding: 10px 17px;
  align-items: center;
}

.chat-context > .context-section:first-child .chat-context-title-row {
  width: 100%;
}

.chat-context-description-section {
  padding-top: 13px;
  padding-bottom: 13px;
}

.context-eyebrow,
.context-label {
  color: #34413a;
  font-size: var(--section-title-size);
  font-weight: var(--section-title-weight);
  letter-spacing: .045em;
}

.context-profile strong,
.context-presence strong {
  color: var(--graphite);
}

.context-profile span,
.context-presence span {
  color: #4f5b54;
}

.context-tags span {
  color: var(--forest-deep);
  background: var(--forest-soft);
  border: 1px solid #d0e4d9;
}

.chat-context-tabs {
  position: sticky;
  z-index: 3;
  top: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 9px 12px;
  background: rgba(255, 255, 255, .98);
  border-bottom: 1px solid var(--divider);
  backdrop-filter: blur(10px);
}

.chat-context-tabs button {
  position: relative;
  min-height: 32px;
  padding: 6px 5px;
  color: #46534b;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 720;
}

.chat-context-tabs button:hover {
  color: var(--forest-deep);
  background: var(--forest-soft);
}

.chat-context-tabs button.is-active {
  color: #fff;
  background: var(--forest);
  border-color: var(--forest);
  box-shadow: 0 3px 9px rgba(25, 122, 90, .15);
}

.chat-context-tabs [data-chat-task-tab-badge] {
  position: absolute;
  top: -6px;
  left: calc(50% + 14px);
  display: grid;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  place-items: center;
  color: #4a3105;
  background: var(--amber);
  border: 2px solid #f7f8f7;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 2px 5px rgba(32, 37, 34, .12);
}

.chat-context-tabs [data-chat-task-tab-badge][hidden] {
  display: none;
}

.chat-context [data-chat-context-pane][hidden] {
  display: none !important;
}

.chat-context-heading .context-label,
.chat-context-title-row .context-eyebrow {
  color: #34413a;
}

.chat-task-toolbar button {
  color: #536159;
  background: #f7f9f7;
  border-color: var(--line);
  border-radius: 7px;
}

.chat-task-toolbar > div button.is-active {
  color: var(--forest-deep);
  background: var(--forest-soft);
  border-color: #c3dccf;
}

.chat-task-toolbar .chat-task-create {
  color: #fff;
  background: var(--forest);
  border-color: var(--forest);
}

.chat-task-card {
  background: #fff;
  border-color: var(--line);
  border-radius: 9px;
  box-shadow: 0 2px 9px rgba(32, 37, 34, .035);
}

.chat-task-card:hover {
  border-color: #b7c8be;
  box-shadow: 0 6px 16px rgba(32, 37, 34, .065);
}

.chat-task-card.is-high-priority,
.chat-task-card.is-overdue {
  background: var(--amber-soft);
  border-color: #ecd29e;
  box-shadow: inset 3px 0 0 var(--amber);
}

.chat-task-card.is-overdue .chat-task-meta time,
.chat-task-priority.is-high {
  color: #94600e;
}

.chat-task-card.is-completed {
  background: #f4f7f5;
  border-color: #dce4df;
  box-shadow: none;
}

.chat-task-toggle {
  border-color: #9badA3;
}

.chat-task-card.is-completed .chat-task-toggle {
  color: #fff;
  background: var(--forest);
  border-color: var(--forest);
}

.chat-task-actions button,
.chat-task-my-link {
  color: var(--forest-deep);
}

.chat-task-actions button:hover,
.chat-task-my-link:hover {
  background: var(--forest-soft);
}

.chat-task-actions button.is-danger,
.chat-danger-zone button,
.chat-leave-room button {
  color: var(--danger);
}

.chat-danger-zone,
.chat-leave-room {
  background: #fffafa;
}

.chat-danger-zone button,
.chat-leave-room button {
  background: #fff;
  border-color: #efbfbc;
}

.chat-danger-zone button:hover,
.chat-leave-room button:hover {
  color: #fff;
  background: var(--danger);
  border-color: var(--danger);
}

.chat-member-item,
.chat-media-item.is-file,
.chat-fixed-source,
.chat-entity-detail {
  background: #f8faf8;
  border-color: var(--line);
  border-radius: 8px;
}

.chat-fixed-source,
.chat-entity-detail,
.chat-entity-section .chat-entity-detail {
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.chat-entity-detail,
.chat-entity-section .chat-entity-detail {
  margin-top: 8px;
}

.chat-member-list {
  gap: 4px;
}

.chat-members-section {
  padding: 0;
}

.chat-members-disclosure > summary {
  display: flex;
  min-height: 48px;
  padding: 10px 17px;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  list-style: none;
  transition: background-color .16s ease;
}

.chat-members-disclosure > summary::-webkit-details-marker {
  display: none;
}

.chat-members-disclosure > summary:hover,
.chat-members-disclosure > summary:focus-visible {
  background: #f5f8f6;
  outline: 0;
}

.chat-members-disclosure > summary .context-label {
  margin: 0;
}

.chat-members-summary-meta {
  display: flex;
  align-items: center;
  gap: 7px;
}

.chat-members-count {
  display: grid;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  place-items: center;
  color: var(--forest-deep);
  background: var(--forest-soft);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 750;
}

.chat-members-summary-meta svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: #4f5b54;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  transition: transform .18s ease;
}

.chat-members-disclosure[open] .chat-members-summary-meta svg {
  transform: rotate(180deg);
}

.chat-members-disclosure-body {
  padding: 0 17px 16px;
  border-top: 1px solid #e2e7e4;
}

.chat-members-disclosure-body .chat-member-list {
  padding-top: 10px;
}

.chat-member-item {
  padding: 4px 5px;
}

.chat-media-item.is-image {
  background: #f3f6f4;
  border-color: var(--line);
  border-radius: 8px;
}

/* One-step typography lift for dense workplace content. */

.chat-sidebar-search input {
  font-size: 12.5px;
}

.rooms-action-button {
  font-size: 11px;
}

.admin-section-nav a,
.account-copy strong {
  font-size: 13px;
}

.account-copy span {
  font-size: 11px;
}

.rooms-empty-state p {
  font-size: 13px;
}

.chat-message-body,
.chat-composer textarea {
  font-size: 16px;
}

.chat-message-meta strong {
  font-size: 14px;
}

.chat-message-meta time,
.chat-forwarded-label {
  font-size: 12.5px;
}

.chat-message-reply-preview strong,
.chat-message-reply-preview span,
.chat-file-attachment strong,
.chat-message-menu button {
  font-size: 13.5px;
}

.chat-file-attachment small,
.chat-message-edited,
.chat-message-read-state,
.chat-message-reactions button,
.chat-message-delivery,
.chat-composer-actions > span,
.chat-pending-files small {
  font-size: 12px;
}

.chat-send-button,
.chat-pending-files strong {
  font-size: 13px;
}

.context-eyebrow,
.context-label,
.chat-context .context-eyebrow,
.chat-context .context-label {
  font-size: 11.5px;
}

.chat-context .context-profile strong {
  font-size: 15px;
}

.chat-context .context-profile span,
.chat-context-field span {
  font-size: 12px;
}

.chat-context .chat-context-description {
  font-size: 14.5px;
}

.chat-task-toolbar button,
.chat-task-form label > span,
.chat-task-form-status,
.chat-task-status,
.chat-task-source,
.chat-task-copy > p,
.chat-task-my-link {
  font-size: 11.5px;
}

.chat-task-form input,
.chat-task-form select,
.chat-task-form textarea,
.chat-task-form footer button {
  font-size: 12.5px;
}

.chat-task-heading strong {
  font-size: 13px;
}

.chat-task-priority,
.chat-task-meta,
.chat-task-source-link,
.chat-task-actions button {
  font-size: 10.5px;
}

.chat-member-item strong,
.chat-fixed-source strong,
.chat-entity-detail > strong {
  font-size: 13px;
}

.chat-member-item small,
.chat-fixed-source span,
.chat-entity-results span,
.chat-entity-detail > small,
.chat-entity-detail > span,
.chat-entity-detail dt,
.chat-entity-detail dd,
.chat-entity-detail a,
.chat-entity-detail em,
.chat-entity-status,
.chat-no-source-note {
  font-size: 11.5px;
}

/* Unified section titles and stronger secondary copy. */

.content-title > span,
.rooms-list-heading,
.admin-nav-heading,
.context-eyebrow,
.context-label,
.chat-context .context-eyebrow,
.chat-context .context-label {
  color: #34413a;
  font-family: "Segoe UI Variable Text", Inter, "Segoe UI", sans-serif;
  font-size: var(--section-title-size);
  font-weight: var(--section-title-weight);
  line-height: 1.25;
}

.content-title > span {
  color: var(--forest-deep);
}

.workhub-shell input::placeholder,
.workhub-shell textarea::placeholder {
  color: #4f5b54;
  opacity: 1;
}

.room-title-line time,
.room-preview-line > span,
.room-list-item.is-muted .room-preview-line > span,
.rooms-empty-state,
.chat-sidebar-no-results,
.account-copy span,
.chat-message-meta time,
.chat-forwarded-label,
.context-profile span,
.context-presence span,
.chat-task-form-status,
.chat-task-status,
.chat-task-source,
.chat-task-meta,
.chat-media-status,
.chat-member-item small,
.chat-fixed-source span,
.chat-entity-results span,
.chat-entity-detail > small,
.chat-entity-detail > span,
.chat-entity-detail dt,
.chat-entity-detail em,
.chat-entity-status,
.chat-no-source-note,
.context-empty-selection span {
  color: var(--muted);
}

.chat-entity-detail dd,
.chat-entity-detail a {
  color: #202923;
}

/* Slightly larger, stronger integration data in the right panel. */

.chat-entity-section > .context-eyebrow {
  font-size: 13px;
  font-weight: 800;
}

.chat-entity-section .chat-context-field > span {
  color: #202923;
  font-size: 13px;
  font-weight: 750;
}

.chat-entity-section .chat-context-field select {
  font-size: 14px;
  font-weight: 550;
}

.chat-entity-section .chat-entity-status {
  font-size: 12.5px;
  font-weight: 550;
}

.chat-entity-section .chat-entity-detail > small {
  font-size: 12px;
  font-weight: 800;
}

.chat-entity-section .chat-entity-detail > strong {
  font-size: 14.5px;
  font-weight: 780;
}

.chat-entity-section .chat-entity-detail > span,
.chat-entity-section .chat-entity-detail dt,
.chat-entity-section .chat-entity-detail dd,
.chat-entity-section .chat-entity-detail a,
.chat-entity-section .chat-entity-detail em {
  font-size: 12.5px;
}

.chat-entity-section .chat-entity-detail dt {
  font-weight: 650;
}

.chat-entity-section .chat-entity-detail dd {
  font-weight: 700;
}

.chat-entity-section .chat-entity-item strong {
  font-size: 12.5px;
  font-weight: 750;
}

.chat-entity-section .chat-entity-item span,
.chat-entity-section .chat-entity-items-empty {
  font-size: 11.5px;
  font-weight: 550;
}

/* Login */

body.auth-body {
  background: var(--canvas);
}

.login-brand {
  color: #fff;
  background:
    radial-gradient(circle at 12% 10%, rgba(25, 122, 90, .34), transparent 34%),
    radial-gradient(circle at 92% 92%, rgba(25, 122, 90, .18), transparent 38%),
    var(--graphite);
  border-right: 0;
}

.brand-lockup,
.brand-lockup:hover,
.brand-lockup:focus-visible,
.brand-name,
.brand-message h1 {
  color: #fff;
}

.brand-mark,
.mobile-brand-mark {
  color: #fff;
  background: var(--forest);
  border: 0;
  border-radius: 9px;
  box-shadow: 0 8px 20px rgba(8, 30, 21, .24);
}

.brand-kicker {
  color: #8fd0b6;
}

.login-eyebrow {
  color: var(--forest-deep);
}

.brand-description,
.brand-footer {
  color: #bdc8c1;
}

.conversation-window {
  background: #f5f7f5;
  border-color: rgba(255, 255, 255, .13);
  border-radius: 12px;
  box-shadow: 0 24px 64px rgba(8, 16, 11, .26);
}

.conversation-body {
  background: #f3f6f3;
}

.message-row-own .message-bubble {
  color: #21483a;
  background: var(--forest-soft);
  border-color: #cce2d6;
}

.login-panel {
  background: var(--canvas);
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.login-card {
  background: #fff;
  border-color: var(--line);
  border-radius: 14px;
  box-shadow: 0 22px 56px rgba(32, 37, 34, .09);
}

.login-input:focus,
.form-control:focus {
  border-color: #75a993;
  box-shadow: 0 0 0 3px rgba(25, 122, 90, .11);
}

/* Responsive frame */

@media (max-width: 1180px) {
  .workhub-shell {
    grid-template-columns: 280px minmax(0, 1fr);
  }

  .chat-message-list {
    padding-right: 24px;
    padding-left: 24px;
  }
}

@media (max-width: 980px) {
  .workhub-shell {
    grid-template-columns: 242px minmax(0, 1fr);
  }
}

@media (max-width: 820px) {
  .rooms-column {
    background: var(--sidebar);
  }

  body.rooms-open .panel-overlay,
  body.context-open .panel-overlay {
    background: rgba(32, 37, 34, .36);
    backdrop-filter: blur(2px);
  }

  .content-header {
    padding-right: 12px;
    padding-left: 12px;
  }
}

@media (max-width: 620px) {
  :root {
    --taskbar-height: 54px;
  }

  .global-taskbar {
    padding: 0 8px 0 10px;
  }

  .global-taskbar-brand > span:last-child,
  .global-profile-copy {
    display: none;
  }

  .content-header {
    min-height: 62px;
    height: 62px;
  }

  .content-title h1 {
    font-size: 17px;
  }

  .chat-message {
    width: min(88%, 700px);
  }

  .chat-message-list,
  .chat-composer {
    padding-right: 0;
    padding-left: 0;
  }

  .chat-history {
    padding: 9px 8px;
  }

  .chat-send-button {
    min-width: 40px;
  }

  .chat-send-button span {
    display: none;
  }

  .chat-context-tabs {
    top: 52px;
  }
}

/* Desktop sidebar refinement v1.1 - compact sections and deterministic avatar palette. */
.chat-sidebar-search {
  margin-bottom: 0;
}

.chat-sidebar-search::after {
  position: absolute;
  right: 0;
  bottom: -7px;
  left: 0;
  height: 1px;
  content: "";
  background: #d7dfda;
  pointer-events: none;
}

.chat-my-chat-section {
  margin-top: 12px;
}

.chat-sidebar-section:not(.chat-group-section) + .chat-sidebar-section:not(.chat-group-section) {
  margin-top: 3px;
}

.chat-sidebar-section-heading {
  padding-top: 3px;
  padding-bottom: 4px;
}

.chat-group-section {
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px solid #d7dfda;
}

.chat-sidebar-heading-actions {
  gap: 4px;
}

.chat-create-group-button {
  width: 25px;
  height: 25px;
  color: #fff;
  background: var(--forest);
  border: 1px solid var(--forest);
  border-radius: 7px;
  box-shadow: 0 2px 7px rgba(25, 122, 90, .16);
}

.chat-create-group-button:hover,
.chat-create-group-button:focus-visible {
  color: #fff;
  background: var(--forest-deep);
  border-color: var(--forest-deep);
}

.room-avatar.avatar-tone-0 { background: #3f78bd; }
.room-avatar.avatar-tone-1 { background: #b95f8a; }
.room-avatar.avatar-tone-2 { background: #c65454; }
.room-avatar.avatar-tone-3 { background: #b88720; }
.room-avatar.avatar-tone-4 { background: #cf7137; }
.room-avatar.avatar-tone-5 { background: #318c82; }
.room-avatar.avatar-tone-6 { background: #7863ad; }
.room-avatar.avatar-tone-7 { background: #4f8a5f; }

.room-avatar[class*="avatar-tone-"] {
  color: #fff;
  font-weight: 750;
  text-shadow: 0 1px 1px rgba(0, 0, 0, .12);
}

.room-avatar[class*="avatar-tone-"] img {
  text-shadow: none;
}
