/* Scoped layout repair; no collaboration permissions or data are changed. */
html.gx-route-collaboration #xh-collaboration-root {
  --xh-c-bg: #111419;
  --xh-c-line: #2c333d;
  --xh-c-line-strong: #3c4756;
  --xh-c-text: #edf1f7;
  --xh-c-text-soft: #b4becd;
  --xh-c-text-muted: #929fb2;
  --xh-c-cyan: #82b3f4;
  --xh-c-purple: #82b3f4;
  --xh-c-shadow: none;
  --xh-c-radius: 12px;
  background: var(--xh-c-bg);
}
html.gx-route-collaboration #xh-collaboration-root::before { display: none; }
#xh-collaboration-root .xh-collab-app {
  width: 100%; max-width: 2400px; min-width: 0;
  padding: 84px clamp(16px, 2vw, 40px) 28px;
}
#xh-collaboration-root :is(h1,h2,h3,h4,h5,h6) {
  font-family: var(--xh-c-font) !important; letter-spacing: normal;
}
#xh-collaboration-root .xh-collab-topbar { min-height: 32px; margin-bottom: 12px; }
#xh-collaboration-root .xh-collab-brand { display: none; }
#xh-collaboration-root .xh-collab-top-actions { margin-left: auto; }
#xh-collaboration-root .xh-collab-hero { align-items: center; gap: 16px; margin-bottom: 20px; }
#xh-collaboration-root .xh-collab-hero h1 { font-size: 28px !important; line-height: 1.3 !important; }
#xh-collaboration-root .xh-collab-hero p { max-width: none; margin-top: 6px; font-size: 13px; }
#xh-collaboration-root .xh-collab-hero .xh-collab-eyebrow { display: none; }
#xh-collaboration-root .xh-collab-hero-note {
  max-width: 280px; padding: 10px 12px; border-color: var(--xh-c-line);
  color: var(--xh-c-text-muted); background: #1b2028;
}
#xh-collaboration-root .xh-collab-layout { grid-template-columns: 280px minmax(0,1fr); gap: 16px; }
#xh-collaboration-root :is(.xh-collab-sidebar,.xh-collab-content,.xh-collab-panel,.xh-collab-project-list,.xh-collab-project-btn,.xh-collab-panel-head>div,.xh-collab-panel-title,.xh-collab-quick-card,.xh-collab-field) { min-width: 0; }
#xh-collaboration-root :is(.xh-collab-sidebar,.xh-collab-panel,.xh-collab-stat) { background: #191e26; box-shadow: none; }
#xh-collaboration-root .xh-collab-sidebar { top: 80px; min-height: 0; padding: 12px 10px; }
#xh-collaboration-root .xh-collab-sidebar-head { padding: 4px 8px 12px; }
#xh-collaboration-root .xh-collab-sidebar-head h2 { font-size: 16px !important; }
#xh-collaboration-root .xh-collab-project-list {
  grid-template-columns: minmax(0,1fr); max-height: calc(100dvh - 276px);
  overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; scrollbar-gutter: stable;
  padding: 3px; overscroll-behavior: contain;
}
#xh-collaboration-root .xh-collab-project-btn { max-width: 100%; width: 100%; padding: 11px 10px; border-radius: 8px; }
#xh-collaboration-root .xh-collab-project-name { max-width: 100%; line-height: 1.6; }
#xh-collaboration-root .xh-collab-project-meta { min-width: 0; }
#xh-collaboration-root .xh-collab-project-meta .xh-collab-muted { white-space: nowrap; font-size: 11px; }
#xh-collaboration-root .xh-collab-project-btn[aria-current="true"] { background: #243449; border-color: #456289; box-shadow: inset 3px 0 0 #82b3f4; }
#xh-collaboration-root .xh-collab-project-btn:hover { background: #222c39; }
#xh-collaboration-root .xh-collab-role { color: #bdc9d9; background: #2a3340; }
#xh-collaboration-root .xh-collab-stat { min-height: 76px; padding: 12px 16px; }
#xh-collaboration-root .xh-collab-stat-value { margin-top: 5px; font-size: 24px; line-height: 1.2; }
#xh-collaboration-root .xh-collab-panel-head { padding: 18px 20px; align-items: flex-start; }
#xh-collaboration-root .xh-collab-panel-title { gap: 8px; }
#xh-collaboration-root .xh-collab-panel-title h2 { font-size: 18px !important; line-height: 1.5 !important; overflow-wrap: anywhere; }
#xh-collaboration-root .xh-collab-panel-subtitle { overflow-wrap: anywhere; }
#xh-collaboration-root .xh-collab-tabs { overflow-y: hidden; padding: 0 12px; }
#xh-collaboration-root .xh-collab-tab { min-height: 44px; }
#xh-collaboration-root .xh-collab-panel-body { padding: 20px; min-height: 240px; }
#xh-collaboration-root :is(.xh-collab-quick-card,.xh-collab-form,.xh-collab-review-card,.xh-collab-member-line,.xh-collab-share-line,.xh-collab-audit-line,.xh-collab-comment) { background: #161c24; box-shadow: none; border-radius: 10px; }
#xh-collaboration-root .xh-collab-btn { border-radius: 8px; background: #222c39; }
#xh-collaboration-root .xh-collab-btn-primary { background: #82b3f4; color: #101923; box-shadow: none; }
#xh-collaboration-root .xh-collab-btn-danger { color: #ffb0c0; background: #38252d; }
#xh-collaboration-root .xh-collab-section-head { flex-wrap: wrap; }
#xh-collaboration-root .xh-collab-section-head h3 { font-size: 15px !important; line-height: 1.5 !important; }
#xh-collaboration-root :is(.xh-collab-share-line,.xh-collab-member-line,.xh-collab-share-url) { flex-wrap: wrap; }
#xh-collaboration-root :is(.xh-collab-share-line>div,.xh-collab-comment-head>div) { min-width: 0; overflow-wrap: anywhere; }
@media(min-width:1920px) {
  #xh-collaboration-root .xh-collab-layout { grid-template-columns: 320px minmax(0,1fr); }
}
@media(max-width:1000px) {
  #xh-collaboration-root .xh-collab-layout { grid-template-columns: 230px minmax(0,1fr); }
  #xh-collaboration-root .xh-collab-hero-note { display: none; }
  #xh-collaboration-root .xh-collab-stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
  #xh-collaboration-root .xh-collab-section-grid { grid-template-columns: minmax(0,1fr); }
}
@media(max-width:700px) {
  #xh-collaboration-root .xh-collab-app { padding: 124px 12px 24px; }
  #xh-collaboration-root .xh-collab-topbar { margin-bottom: 8px; }
  #xh-collaboration-root .xh-collab-hero { display: block; margin-bottom: 14px; }
  #xh-collaboration-root .xh-collab-hero h1 { font-size: 24px !important; }
  #xh-collaboration-root .xh-collab-layout { grid-template-columns: minmax(0,1fr); gap: 12px; }
  #xh-collaboration-root .xh-collab-sidebar { position: static; }
  #xh-collaboration-root .xh-collab-project-list { max-height: 176px; }
  #xh-collaboration-root .xh-collab-stat { min-height: 65px; padding: 10px 12px; }
  #xh-collaboration-root .xh-collab-stat-value { font-size: 21px; }
  #xh-collaboration-root .xh-collab-panel-head { padding: 14px; }
  #xh-collaboration-root .xh-collab-panel-title h2 { font-size: 16px !important; }
  #xh-collaboration-root .xh-collab-panel-body { padding: 14px; }
  #xh-collaboration-root :is(.xh-collab-form-grid,.xh-collab-binding) { grid-template-columns: minmax(0,1fr); }
  #xh-collaboration-root .xh-collab-comment-head { align-items: flex-start; flex-wrap: wrap; }
}


/* Keep the shared account controls off the brand/menu row on small screens. */
@media(max-width:700px) {
  html.gx-ui.gx-route-collaboration .gx-account-dock.gx-account-floating {
    top: 64px !important; left: 12px !important; right: 12px !important;
    width: auto !important; max-width: none !important; height: auto !important;
    min-height: 44px; flex-wrap: wrap !important; justify-content: flex-start !important;
    gap: 5px !important; padding: 5px 0 !important; background: #111419 !important;
  }
  #xh-collaboration-root .xh-collab-app { padding-top: 124px; }
}
@media(max-width:360px) {
  #xh-collaboration-root .xh-collab-app { padding-top: 166px; }
}


/* Unified fixed header: all controls stay in the same opaque navigation strip. */
html.gx-ui.gx-route-collaboration body::before {
  display: block !important;
  content: ''; position: fixed; inset: 0 0 auto; height: 64px; z-index: 50;
  background: #111419; border-bottom: 1px solid #2c333d; pointer-events: none;
}
html.gx-ui.gx-route-collaboration .gx-interior-brand {
  position: fixed !important; top: 0 !important; height: 64px !important;
  background: transparent !important; border: 0 !important; z-index: 52;
}
html.gx-ui.gx-route-collaboration .gx-interior-menu { top: 0 !important; height: 64px !important; }
html.gx-ui.gx-route-collaboration .gx-account-dock.gx-account-floating { background: transparent !important; }
@media(max-width:700px) {
  html.gx-ui.gx-route-collaboration body::before { height: 154px; }
  #xh-collaboration-root .xh-collab-app { padding-top: 168px; }
  #xh-collaboration-root .xh-collab-topbar { display: none; }
}
