:root {
  --orange: var(--primary);
  --orange-soft: var(--primary-bg);
  --surface: #fff;
  --canvas: #f1f2f6;
  --text: #333;
  --muted: #999;
  --border: rgba(0, 0, 0, .06);
  --shadow: 0 1px 1px rgba(0, 0, 0, .02);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-gutter: stable; }
body { margin: 0; background: var(--canvas); color: var(--text); font-family: Inter, Arial, sans-serif; font-size: 14px; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
img { display: block; }
[hidden] { display: none !important; }

.topbar {
  position: sticky; top: 0; z-index: 50; height: 60px; display: grid;
  width: 100vw; grid-template-columns: 240px minmax(300px,620px) 340px;
  column-gap: max(0px, calc((100vw - 1240px) / 2)); justify-content: start; align-items: center;
  padding: 8px 20px; background: #fff; border-bottom: 1px solid var(--border);
}
.header-left { width: 240px; display: flex; align-items: center; gap: 12px; }
.brand { flex: 0 0 38px; width: 38px; height: 32px; }
.brand img { width: 38px; height: 32px; object-fit: contain; }
.burger-button { display: none; width: 32px; height: 32px; flex: 0 0 32px; padding: 7px 5px; border: 0; border-radius: 8px; background: transparent; cursor: pointer; }
.burger-button:hover { background: #f1f2f6; }
.burger-button span { display: block; width: 22px; height: 2px; margin: 3px 0; border-radius: 2px; background: rgba(0,0,0,.65); transition: transform .18s ease, opacity .18s ease; }
body.sidebar-open .burger-button span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
body.sidebar-open .burger-button span:nth-child(2) { opacity: 0; }
body.sidebar-open .burger-button span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }
.searchbox { width: 100%; height: 32px; display: flex; align-items: center; gap: 16px; padding: 0 16px; border-radius: 56px; background: #f1f2f6; }
.searchbox img { width: 16px; height: 16px; }
.searchbox input { width: 100%; padding: 0; border: 0; outline: 0; background: transparent; color: #333; font-size: 16px; }
.searchbox input::placeholder { color: #999; }
.user-actions { width: 340px; display: flex; gap: 16px; align-items: center; justify-content: flex-end; }
.notification, .profile { border: 0; padding: 0; background: transparent; cursor: pointer; }
.notification { position: relative; width: 32px; height: 32px; border: 1px solid rgba(0,0,0,.15); border-radius: 50%; display: grid; place-items: center; }
.notification img { width: 16px; height: 16px; }
.notification span { position: absolute; right: -8px; top: -8px; min-width: 20px; height: 20px; padding: 0 4px; display: grid; place-items: center; border: 1px solid #fff; border-radius: 16px; background: #ff4d4f; color: #fff; font-size: 12px; }
.profile { display: flex; gap: 4px; align-items: center; }
.profile-avatar { width: 32px; height: 32px; border: 1px solid var(--border); border-radius: 50%; object-fit: cover; }
.profile-chevron { width: 16px; height: 16px; }

.portal-layout { width: 100%; min-height: calc(100vh - 60px); display: grid; grid-template-columns: 280px minmax(0, 1fr) 380px; background: var(--canvas); }
.sidebar { padding: 20px; background: #fff; border-right: 1px solid var(--border); }
.primary-nav { display: flex; flex-direction: column; gap: 4px; }
.nav-row { position: relative; min-height: 48px; display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 28px; outline: 0; font-size: 16px; font-weight: 500; }
.nav-row:hover, .service-row:hover { background: #fafafa; }
.nav-row.active { background: #f1f2f6; }
.nav-row:focus-visible { box-shadow: 0 0 0 2px rgba(var(--brand-rgb,10,33,79),.3); }
.nav-row > img, .nav-icon-wrap > img, .line-icon { width: 24px; height: 24px; object-fit: contain; }
.line-icon { display: grid; place-items: center; font-size: 24px; font-weight: 400; }
.nav-icon-wrap { position: relative; width: 24px; height: 24px; }
.nav-icon-wrap b { position: absolute; left: 14px; top: -10px; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; background: #f04438; color: #fff; font-size: 12px; }
.nav-section { margin-top: 16px; }
.nav-section h2 { margin: 0 0 8px; padding: 0 12px; color: rgba(0,0,0,.65); font-size: 16px; line-height: 16px; font-weight: 400; }
.service-row { min-height: 52px; display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 28px; font-size: 16px; font-weight: 500; }
.service-logo { position: relative; flex: 0 0 28px; width: 28px; height: 28px; overflow: hidden; border-radius: 50%; background: #f1f2f6; }
.service-logo img { width: 100%; height: 100%; object-fit: cover; }
.service-logo.peach { background: linear-gradient(#ffeede, #fec694); }
.service-logo.lilac { background: linear-gradient(#eff3ff, #d4d7e8); }
.service-title { flex: 1; min-width: 0; }
.row-tools { display: flex; gap: 8px; align-items: center; }
.row-tools img { width: 20px; height: 20px; }
.row-tools img.menu-chevron { width: 16px; height: 16px; }
.pin-button { width: 20px; height: 20px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 4px; background: transparent; cursor: pointer; }
.pin-button img { width: 20px; height: 20px; }
.corporate-services .pin-button { opacity: 0; pointer-events: none; transition: opacity .15s ease; }
.corporate-services .service-row:hover .pin-button,
.corporate-services .service-row:focus-within .pin-button { opacity: 1; pointer-events: auto; }
.pin-button:focus-visible { outline: 2px solid rgba(var(--brand-rgb,10,33,79),.35); outline-offset: 2px; }
@media (hover: none) {
  .corporate-services .pin-button { opacity: 1; pointer-events: auto; }
}

.feed { min-width: 0; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.feed-tabs { min-height: 60px; display: flex; gap: 12px; align-items: center; padding: 8px; border-radius: 50px; background: #fff; }
.feed-tab { flex: 1; height: 44px; display: flex; gap: 12px; align-items: center; justify-content: center; border: 0; outline: 0; border-radius: 24px; background: #f1f2f6; color: #333; font-size: 16px; font-weight: 600; cursor: pointer; }
.feed-tab img { width: 20px; height: 20px; }
.feed-tab.active { background: var(--orange-soft); color: var(--orange); }
.feed-tab:focus-visible { box-shadow: 0 0 0 2px rgba(var(--brand-rgb,10,33,79),.28); }
.stories { min-height: 128px; display: flex; align-items: center; gap: 10px; padding: 16px; border: 1px solid var(--border); border-radius: 24px; background: #fff; overflow: hidden; }
.circle-arrow { flex: 0 0 36px; width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid rgba(0,0,0,.15); border-radius: 50%; background: #fff; cursor: pointer; }
.circle-arrow img { width: 18px; height: 18px; }
.circle-arrow.prev { transform: rotate(180deg); }
.story-track { flex: 1; min-width: 0; display: flex; gap: 10px; align-items: center; overflow-x: auto; scrollbar-width: none; scroll-behavior: smooth; }
.story-track::-webkit-scrollbar { display: none; }
.story { flex: 0 0 76px; min-width: 68px; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.story-visual { width: 76px; height: 76px; padding: 4px; border-radius: 20px; }
.story:first-child .story-visual { border: 1.5px solid var(--orange); }
.story-visual img { width: 68px; height: 68px; object-fit: cover; border: 1px solid #eee; border-radius: 16px; background: #f1f2f6; }
.story strong { width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; font-size: 12px; line-height: 12px; letter-spacing: -.24px; }
.post-list { display: flex; flex-direction: column; gap: 12px; }
.channels-grid { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px; }
.channel-card { height: 220px; overflow: hidden; border: 1px solid #eee; border-radius: 12px; background: #fff; cursor: pointer; transition: transform .16s ease, box-shadow .16s ease; }
.channel-card:hover, .channel-card:focus-visible { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0,0,0,.07); }
.channel-cover { position: relative; width: 100%; height: 132px; overflow: hidden; background: #f1f2f6; }
.channel-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.channel-info { height: 88px; display: flex; gap: 20px; align-items: center; padding: 16px; }
.channel-avatar { flex: 0 0 56px; width: 56px; height: 56px; overflow: hidden; border: 1px solid #eee; border-radius: 50%; background: #f1f2f6; }
.channel-avatar img { width: 100%; height: 100%; object-fit: cover; }
.channel-copy { min-width: 0; display: flex; flex-direction: column; gap: 8px; justify-content: flex-end; }
.channel-copy strong { overflow: hidden; color: #333; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; line-height: 16px; font-weight: 600; }
.channel-copy span { color: #999; font-size: 15px; line-height: 18px; white-space: nowrap; }
.events-grid { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px; }
.event-card { height: 303px; overflow: hidden; border: 1px solid #eee; border-radius: 16px; outline: 0; background: #fff; cursor: pointer; transition: transform .16s ease, box-shadow .16s ease; }
.event-card:hover, .event-card:focus-visible { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0,0,0,.07); }
.event-cover { width: 100%; height: 180px; overflow: hidden; background: #fff; }
.event-cover img { width: 100%; height: 100%; object-fit: cover; }
.event-card.running .event-cover img { object-position: center 52%; }
.event-card.standup .event-cover img { object-position: center top; }
.event-content { height: 123px; display: flex; flex-direction: column; gap: 16px; padding: 16px; background: #fff; }
.event-date, .event-organizer-count { overflow: hidden; color: #999; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; line-height: 17px; }
.event-title { overflow: hidden; color: #333; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; line-height: 18px; font-weight: 600; }
.event-organizers { height: 24px; display: flex; gap: 8px; align-items: center; }

.portal-settings-popover {
  position: fixed;
  left: 105px;
  bottom: 41px;
  z-index: 130;
  width: 437px;
  height: 231px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
  visibility: hidden;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 9px 28px 8px rgba(0,0,0,.05), 0 3px 6px -4px rgba(0,0,0,.12), 0 6px 16px rgba(0,0,0,.08);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-10px) scale(.985);
  transform-origin: left bottom;
  transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s;
}
body.portal-settings-open .portal-settings-popover {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0) scale(1);
  transition-delay: 0s;
}
.portal-settings-popover h2 {
  margin: 0;
  color: rgba(0,0,0,.88);
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
}
.portal-settings-row {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.portal-settings-row > strong,
.portal-language-group > strong {
  color: rgba(0,0,0,.88);
  font-size: 14px;
  line-height: 22px;
  font-weight: 600;
}
.portal-theme-switch {
  width: 88px;
  height: 44px;
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 4px;
  border-radius: 40px;
  background: #f1f2f6;
}
.portal-theme-option {
  position: relative;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}
.portal-theme-option.active { background: #fff; }
.portal-theme-option img { position: absolute; width: 0; height: 0; overflow: hidden; opacity: 0; }
.portal-theme-option::before {
  content: "";
  width: 20px;
  height: 20px;
  background: rgba(0,0,0,.45);
  -webkit-mask: center / contain no-repeat;
  mask: center / contain no-repeat;
}
.portal-theme-option[data-theme-choice="light"]::before {
  -webkit-mask-image: url("assets/settings-theme-sun.svg");
  mask-image: url("assets/settings-theme-sun.svg");
}
.portal-theme-option[data-theme-choice="dark"]::before {
  -webkit-mask-image: url("assets/settings-theme-moon.svg");
  mask-image: url("assets/settings-theme-moon.svg");
}
.portal-theme-option.active::before { background: var(--primary); }
.portal-settings-divider { width: 100%; height: 1px; flex: 0 0 1px; background: rgba(0,0,0,.06); }
.portal-language-group { display: flex; flex-direction: column; gap: 12px; }
.portal-language-switch { height: 40px; display: flex; gap: 16px; }
.portal-language-switch button {
  min-width: 0;
  flex: 1 1 0;
  height: 40px;
  padding: 0 12px;
  overflow: hidden;
  border: 0;
  border-radius: 24px;
  background: #f1f2f6;
  color: #333;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
  cursor: pointer;
}
.portal-language-switch button.active { background: var(--primary-bg); color: var(--primary); }
.portal-theme-option:focus-visible,
.portal-language-switch button:focus-visible { outline: 2px solid rgba(var(--brand-rgb,10,33,79),.35); outline-offset: 2px; }
.concept-v2 .rail-settings[aria-expanded="true"] > span { border-color: transparent; background: var(--primary-bg); }

@media (max-width: 1199px) {
  .portal-settings-popover {
    right: 20px;
    bottom: 20px;
    left: 20px;
    width: auto;
    max-width: 437px;
    margin-left: auto;
    transform: translateY(10px) scale(.985);
    transform-origin: right bottom;
  }
  body.portal-settings-open .portal-settings-popover { transform: translateY(0) scale(1); }
  .portal-language-switch { gap: 8px; }
  .portal-language-switch button { padding: 0 8px; font-size: 14px; }
}
.event-avatars { display: flex; padding-right: 8px; }
.event-avatar { position: relative; width: 24px; height: 24px; display: grid; place-items: center; margin-right: -8px; overflow: hidden; border: 1px solid #fff; border-radius: 50%; color: #fff; background: var(--orange); font-size: 12px; line-height: 20px; }
.event-avatar:last-child { margin-right: 0; }
.event-avatar img { width: 100%; height: 100%; object-fit: cover; }
.event-avatar.green { padding: 5px; background: #52c41a; }
.event-avatar.green img { width: 14px; height: 14px; object-fit: contain; }
.event-avatar.pale { color: var(--orange); background: var(--primary-bg); }
.post-card { position: relative; min-height: 199px; display: grid; grid-template-columns: minmax(0,1fr) 184px; grid-template-rows: 32px auto; gap: 16px; padding: 16px; border: 1px solid var(--border); border-bottom-color: rgba(0,0,0,.1); border-radius: 24px; outline: 0; background: #fff; box-shadow: var(--shadow); cursor: pointer; transition: transform .16s ease, box-shadow .16s ease; }
.post-card.has-image { min-height: 210px; }
.post-card.menu-open { z-index: 12; }
.post-card:hover, .post-card:focus-visible { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0,0,0,.07); }
.post-card-header { grid-column: 1 / -1; min-width: 0; height: 32px; display: flex; gap: 16px; align-items: center; justify-content: space-between; }
.post-copy { min-width: 0; display: flex; flex-direction: column; gap: 12px; justify-content: center; }
.post-card.no-image .post-copy { grid-column: 1 / -1; }
.post-meta { min-width: 0; display: flex; gap: 8px; align-items: center; color: #999; font-size: 14px; }
.channel-mark { width: 20px; height: 20px; object-fit: cover; border-radius: 50%; }
.post-meta b { color: #333; font-size: 14px; font-weight: 500; }
.post-meta time { white-space: nowrap; }
.post-pin-mark { width: 16px; height: 16px; object-fit: contain; filter: grayscale(1) opacity(.68); }
.post-more-wrap { position: relative; flex: 0 0 32px; width: 32px; height: 32px; }
.post-more-button { width: 32px; height: 32px; display: grid; place-items: center; padding: 0; border: 1px solid rgba(0,0,0,.15); border-radius: 50%; outline: 0; background: #fff; color: rgba(0,0,0,.45); cursor: pointer; transition: border-color .15s ease, background-color .15s ease, color .15s ease, transform .15s ease; }
.post-more-button:hover { border-color: rgba(0,0,0,.25); background: #fff; color: rgba(0,0,0,.65); }
.post-more-button:active { transform: scale(.94); }
.post-more-button[aria-expanded="true"], .post-more-button[aria-expanded="true"]:hover { border-color: rgba(0,0,0,.15); background: #f1f2f6; color: rgba(0,0,0,.65); }
.post-more-button:focus-visible { outline: 2px solid rgba(var(--brand-rgb,10,33,79),.35); outline-offset: 2px; }
.post-more-glyph { width: 3px; height: 3px; border-radius: 50%; background: currentColor; box-shadow: 0 -5px currentColor, 0 5px currentColor; }
.post-more-menu { position: absolute; z-index: 30; top: 40px; right: 0; width: 205px; display: flex; flex-direction: column; padding: 4px; border-radius: 8px; background: #fff; box-shadow: 0 6px 8px rgba(0,0,0,.08), 0 3px 3px rgba(0,0,0,.12), 0 9px 14px rgba(0,0,0,.05); cursor: default; }
.post-more-menu[hidden] { display: none; }
.post-menu-item { width: 100%; height: 32px; display: flex; gap: 8px; align-items: center; padding: 5px 12px; border: 0; border-radius: 4px; background: transparent; color: rgba(0,0,0,.88); font: inherit; font-size: 14px; line-height: 22px; text-align: left; white-space: nowrap; cursor: pointer; }
.post-menu-item:hover, .post-menu-item:focus-visible { outline: 0; background: rgba(0,0,0,.04); }
.post-menu-icon { position: relative; flex: 0 0 16px; width: 16px; height: 16px; display: grid; place-items: center; }
.post-menu-icon img { width: 16px; height: 16px; object-fit: contain; }
.post-menu-icon.pin-off::after { content: ''; position: absolute; left: 7px; top: -1px; width: 1.5px; height: 18px; border-radius: 2px; background: rgba(0,0,0,.88); transform: rotate(-45deg); box-shadow: 0 0 0 1px #fff; }
.post-menu-divider { height: 8px; display: block; border-top: 1px solid rgba(0,0,0,.06); }
.post-menu-item.danger { color: #ff4d4f; }
.post-title { margin: 0; color: #333; font-size: 18px; line-height: 1.28; font-weight: 600; }
.post-description { margin: 0; color: #999; font-size: 15px; line-height: 1.4; }
.post-stats { display: flex; gap: 16px; align-items: center; color: #999; }
.post-stats span { display: flex; gap: 4px; align-items: center; }
.post-stats img { width: 16px; height: 16px; }
.post-image { width: 184px; height: 130px; align-self: center; object-fit: cover; border: 1px solid rgba(0,0,0,.1); border-radius: 16px; background: #f6f6f6; }
.audit-row { display: flex; gap: 16px; }
.audit-person { flex: 1; display: flex; gap: 12px; align-items: center; min-width: 0; }
.audit-person img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.audit-person div { min-width: 0; display: flex; flex-direction: column; }
.audit-person span { align-self: flex-start; padding: 2px 8px; border-radius: 28px; background: rgba(0,0,0,.06); color: rgba(0,0,0,.65); font-size: 12px; }
.audit-person b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 500; }
.audit-details { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.audit-details > img { width: 16px; height: 16px; }
.stars { display: inline-flex; gap: 2px; }
.stars img { width: 20px; height: 20px; }

.widgets-page { grid-column: 2 / 4; align-self: start; padding: 20px; }
.widgets-manager { display: flex; flex-direction: column; gap: 24px; padding: 24px; border: 1px solid var(--border); border-radius: 24px; background: #fff; }
.widgets-manager-head { display: flex; flex-direction: column; gap: 4px; }
.widgets-manager-head h1 { margin: 0; color: rgba(0,0,0,.88); font-size: 16px; line-height: 24px; font-weight: 600; }
.widgets-manager-head p { margin: 0; color: rgba(0,0,0,.45); font-size: 16px; line-height: 24px; }
.widgets-manager-grid { display: flex; flex-direction: column; gap: 16px; }
.widget-manager-group { display: flex; flex-direction: column; gap: 16px; }
.widget-manager-group h3 { margin: 0; color: rgba(0,0,0,.88); font-size: 14px; line-height: 22px; font-weight: 600; }
.widget-manager-list { display: flex; flex-direction: column; gap: 16px; }
.widget-manager-item { min-width: 0; display: flex; gap: 16px; align-items: center; }
.widget-preview { position: relative; flex: 0 0 136px; width: 136px; height: 95px; overflow: hidden; border: 0; border-radius: 12px; background: #eee; }
.widget-preview-card { position: absolute !important; top: 12px; left: 8px; width: 340px !important; margin: 0 !important; pointer-events: none; transform: scale(.352941) !important; transform-origin: top left !important; transition: none !important; }
.widget-preview-card .widget-title > img { cursor: default; }
.widget-manager-info { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.widget-manager-copy { width: 100%; display: flex; flex-direction: column; gap: 2px; font-size: 14px; line-height: normal; }
.widget-manager-copy strong { overflow: hidden; color: rgba(0,0,0,.88); text-overflow: ellipsis; font-weight: 600; }
.widget-manager-copy span { overflow: hidden; color: rgba(0,0,0,.45); text-overflow: ellipsis; font-weight: 400; }
.widget-toggle { min-width: 79px; height: 31px; display: flex; gap: 8px; align-items: center; justify-content: center; padding: 0 24px; border: 1px solid rgba(0,0,0,.15); border-radius: 24px; background: #fff; color: rgba(0,0,0,.88); font-size: 12px; font-weight: 500; cursor: pointer; }
.widget-toggle.add { border-color: var(--orange); background: #fff; color: var(--orange); }
.widget-toggle.locked { border-color: transparent; background: rgba(0,0,0,.04); color: rgba(0,0,0,.25); cursor: default; }
.widget-toggle.locked img { width: 12px; height: 12px; }
.widget-toggle:focus-visible { outline: 2px solid rgba(var(--brand-rgb,10,33,79),.35); outline-offset: 2px; }

.chats-page { grid-column: 2 / 4; align-self: start; min-width: 0; padding: 24px; }
.chats-shell { height: calc(100vh - 108px); min-height: 640px; display: grid; grid-template-columns: 375px minmax(0,1fr); overflow: hidden; border: 1px solid var(--border); border-radius: 16px; background: #fff; }
.chat-sidebar { min-width: 0; display: flex; flex-direction: column; overflow: hidden; border-right: 1px solid var(--border); background: #fff; }
.chat-list-default { min-height: 0; height: 100%; display: flex; flex-direction: column; }
.chat-creating > .chat-list-default { display: none; }
.chat-sidebar-head { min-height: 64px; display: flex; gap: 16px; align-items: center; padding: 16px; }
.chat-sidebar-head h1 { margin: 0; color: #171a1f; font-size: 24px; line-height: 32px; font-weight: 600; }
.chat-title-menu { flex: 0 0 24px; width: 24px; height: 24px; display: grid; place-items: center; padding: 0; border: 0; background: transparent; cursor: pointer; }
.chat-title-menu img { width: 24px; height: 17px; }
.chat-sidebar-head > div { display: flex; gap: 16px; align-items: center; margin-left: auto; }
.chat-circle-button { width: 32px; height: 32px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: #f1f2f6; cursor: pointer; }
.chat-circle-button.orange { background: var(--orange); }
.chat-circle-button img { width: 16px; height: 16px; }
.chat-search { position: relative; height: 56px; display: flex; align-items: center; padding: 8px 16px; background: #fff; }
.chat-search img { position: absolute; z-index: 1; left: 32px; top: 20.5px; width: 20px; height: 20px; pointer-events: none; }
.chat-search input { width: 100%; height: 45px; padding: 0 16px 0 52px; border: 0; outline: 0; border-radius: 56px; background: #f1f2f6; color: #333; font-size: 18px; line-height: 25px; }
.chat-search input::placeholder { color: #999; }
.chat-contact-list { flex: 1; overflow-y: auto; }
.chat-contact { width: 100%; min-height: 76px; display: flex; gap: 12px; align-items: center; padding: 10px 16px; border: 0; background: #fff; text-align: left; cursor: pointer; }
.chat-contact:hover { background: #fafafa; }
.chat-contact.active { background: var(--orange-soft); }
.chat-contact:focus-visible { outline: 2px solid rgba(var(--brand-rgb,10,33,79),.3); outline-offset: -2px; }
.chat-contact-avatar { position: relative; flex: 0 0 56px; width: 56px; height: 56px; }
.chat-contact-avatar > img { width: 56px; height: 56px; border: 1px solid #eee; border-radius: 50%; object-fit: cover; }
.chat-contact-avatar.notification { display: grid; place-items: center; overflow: hidden; border-radius: 50%; background: linear-gradient(180deg,#ffac62 0%,var(--primary) 100%); }
.chat-contact-avatar.notification > img { width: 28px; height: 28px; border: 0; border-radius: 0; object-fit: contain; }
.chat-online { position: absolute; right: 1px; bottom: 1px; width: 12px; height: 12px; border: 3px solid #fff; border-radius: 50%; background: #00b578; }
.chat-contact-copy { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.chat-contact-title-row, .chat-contact-preview { min-width: 0; display: flex; gap: 6px; align-items: center; }
.chat-contact-title-row strong { overflow: hidden; color: #333; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 500; }
.chat-contact-title-row img { width: 16px; height: 16px; }
.chat-contact-preview span { min-width: 0; flex: 1; overflow: hidden; color: #999; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; line-height: 22px; }
.chat-contact-preview time { color: #999; font-size: 14px; white-space: nowrap; }

.publication-page { grid-column: 2 / 4; min-width: 0; padding: 0 0 72px; background: #fff; }
.publication-content-header { height: 90px; display: flex; flex-direction: column; align-items: flex-start; padding: 12px 24px 0; border-bottom: 1px solid var(--border); background: #fff; }
.publication-breadcrumbs { height: 22px; display: flex; gap: 0; align-items: center; color: rgba(0,0,0,.88); font-size: 14px; line-height: 22px; font-weight: 400; }
.publication-breadcrumbs a, .publication-breadcrumbs > span:last-child { padding: 0 4px; }
.publication-breadcrumbs > span:nth-child(2) { padding: 0 8px; color: rgba(0,0,0,.45); }
.publication-breadcrumbs a { color: rgba(0,0,0,.45); }
.publication-breadcrumbs a:hover { color: var(--orange); }
.publication-back { width: 100%; height: 56px; display: flex; gap: 16px; align-items: center; padding: 8px 12px 12px 0; border: 0; background: transparent; color: rgba(0,0,0,.88); font-size: 20px; line-height: 28px; font-weight: 600; text-align: left; cursor: pointer; }
.publication-back-icon { flex: 0 0 36px; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 54px; background: #f1f2f6; }
.publication-back-icon img { width: 24px; height: 24px; transform: rotate(180deg); }
.publication-article { width: min(732px,calc(100% - 40px)); margin: 40px auto 0; }
.publication-heading { display: flex; flex-direction: column; gap: 20px; margin-bottom: 20px; }
.publication-heading h1 { margin: 0; color: rgba(0,0,0,.88); font-size: 24px; line-height: 29px; font-weight: 700; }
.publication-meta { display: flex; gap: 8px; align-items: center; color: #999; font-size: 16px; }
.publication-meta img { width: 28px; height: 28px; border: 1px solid #eee; border-radius: 50%; object-fit: cover; }
.publication-meta strong { color: #333; font-weight: 500; }
.publication-hero { width: 100%; height: 386px; margin-bottom: 20px; border: 1px solid rgba(0,0,0,.1); border-radius: 16px; object-fit: cover; background: #f6f6f6; }
.publication-body { display: flex; flex-direction: column; gap: 20px; color: rgba(0,0,0,.88); font-size: 18px; line-height: 1.4; }
.publication-body p, .publication-body h2, .publication-body ul, .publication-body blockquote { margin: 0; }
.publication-body h2 { font-size: 20px; line-height: 28px; font-weight: 600; }
.publication-body blockquote { padding: 8px 0 8px 36px; border-left: 4px solid var(--orange); color: rgba(0,0,0,.45); font-style: italic; }
.publication-body ul { padding-left: 27px; }
.publication-comments { margin-top: 40px; padding-top: 40px; border-top: 1px solid rgba(0,0,0,.1); }
.publication-comments > h2, .publication-related > h2 { margin: 0 0 24px; color: #000; font-size: 24px; line-height: 29px; font-weight: 600; }
.publication-current-user { display: flex; gap: 4px; align-items: center; margin-bottom: 16px; }
.publication-current-user > img { width: 32px; height: 32px; border: 1px solid var(--border); border-radius: 50%; object-fit: cover; }
.publication-current-user div { display: flex; flex-direction: column; }
.publication-current-user strong { color: rgba(0,0,0,.88); font-size: 14px; font-weight: 500; }
.publication-current-user span { color: rgba(0,0,0,.45); font-size: 14px; }
.publication-comment-form { display: flex; gap: 12px; align-items: center; padding-bottom: 40px; border-bottom: 1px solid rgba(0,0,0,.1); }
.publication-comment-form input { flex: 1; min-width: 0; height: 40px; padding: 0 16px; border: 0; outline: 0; border-radius: 54px; background: #f1f2f6; color: #333; font-size: 16px; }
.publication-comment-form input::placeholder { color: #999; }
.publication-emoji { width: 40px; height: 40px; border: 0; border-radius: 50%; background: #f1f2f6; color: #666; font-size: 20px; cursor: pointer; }
.publication-submit { height: 40px; padding: 0 20px; border: 1px solid rgba(0,0,0,.15); border-radius: 24px; background: #fff; color: rgba(0,0,0,.88); font-size: 16px; cursor: pointer; }
.publication-submit:hover { border-color: var(--orange); color: var(--orange); }
.publication-comment-list { display: flex; flex-direction: column; gap: 24px; padding-top: 24px; }
.publication-comment { display: flex; gap: 12px; align-items: flex-start; }
.publication-comment > img { flex: 0 0 40px; width: 40px; height: 40px; border: 1px solid #eee; border-radius: 50%; object-fit: cover; }
.publication-comment-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; padding-top: 4px; }
.publication-comment-head { display: flex; gap: 8px; align-items: center; }
.publication-comment-head strong { color: #333; font-size: 16px; font-weight: 500; }
.publication-comment-head time { color: #999; font-size: 14px; }
.publication-comment-copy p { margin: 0; color: #333; font-size: 14px; line-height: 20px; }
.publication-comment-actions { display: flex; gap: 12px; align-items: center; color: #999; font-size: 12px; }
.publication-comment-actions button { padding: 0; border: 0; background: transparent; color: var(--orange); cursor: pointer; }
.publication-comment-actions span { display: flex; gap: 4px; align-items: center; }
.publication-comment-actions img { width: 14px; height: 14px; }
.publication-related { margin-top: 40px; padding-top: 40px; border-top: 1px solid rgba(0,0,0,.1); }
.publication-related-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px; }
.publication-related-card { min-width: 0; overflow: hidden; border: 1px solid #eee; border-radius: 16px; background: #fff; cursor: pointer; transition: transform .16s ease, box-shadow .16s ease; }
.publication-related-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0,0,0,.07); }
.publication-related-card > img { width: 100%; height: 168px; object-fit: cover; }
.publication-related-copy { display: flex; flex-direction: column; gap: 8px; padding: 12px 16px 16px; }
.publication-related-copy .publication-meta { gap: 6px; font-size: 12px; }
.publication-related-copy .publication-meta img { width: 20px; height: 20px; }
.publication-related-copy h3 { margin: 0; overflow: hidden; color: #333; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; line-height: 20px; font-weight: 600; }
.publication-related-copy p { margin: 0; display: -webkit-box; overflow: hidden; color: #999; font-size: 12px; line-height: 18px; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.publication-related-stats { display: flex; gap: 14px; color: #999; font-size: 12px; }
.publication-related-stats span { display: flex; gap: 4px; align-items: center; }
.publication-related-stats img { width: 14px; height: 14px; }

@media (min-width: 1200px) {
  body { overflow-x: hidden; }
  .portal-layout { width: 100vw; }
  .publication-page { width: calc(100vw - 280px); }
  .publication-article { position: relative; left: 2px; }
}

.feed-tabs,
.stories,
.post-list,
.channels-grid,
.events-grid {
  width: 100%;
  max-width: 756px;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 1440px) {
  .feed { padding-left: 12px; padding-right: 12px; }
}
.chat-unread { flex: 0 0 8px; width: 8px; height: 8px; display: block; border-radius: 50%; background: var(--orange); font-size: 0; }
.chat-conversation { min-width: 0; display: flex; flex-direction: column; overflow: hidden; background: #fff; }
.chat-conversation:not(.has-active) > .chat-conversation-head,
.chat-conversation:not(.has-active) > .chat-messages,
.chat-conversation:not(.has-active) > .chat-compose-context,
.chat-conversation:not(.has-active) > .chat-composer { display: none; }
.chat-conversation.has-active > .chat-placeholder { display: none; }
.chat-placeholder { min-height: 0; flex: 1; display: flex; flex-direction: column; gap: 8px; align-items: center; justify-content: center; padding: 24px; color: #999; text-align: center; }
.chat-placeholder-art { position: relative; width: 200px; height: 120px; }
.chat-placeholder-art > span { position: absolute; top: 50%; display: grid; place-items: center; border-style: solid; border-color: #fff; border-radius: 50%; transform: translateY(-50%); }
.chat-placeholder-art .side { z-index: 1; width: 60px; height: 60px; border-width: 5px; background: #f1f2f6; }
.chat-placeholder-art .side img { width: 38px; height: 38px; }
.chat-placeholder-art .person { left: 12px; }
.chat-placeholder-art .person img { transform: rotate(-6deg); }
.chat-placeholder-art .emoji { right: 12px; }
.chat-placeholder-art .emoji img { transform: rotate(5.77deg); }
.chat-placeholder-art .center { z-index: 2; left: 50%; width: 76px; height: 76px; border-width: 6px; background: var(--primary-bg); box-shadow: 0 8px 4px #f2f4f7; transform: translate(-50%,-50%); }
.chat-placeholder-art .center img { width: 48px; height: 48px; }
.chat-placeholder p { width: 100%; margin: 0; overflow: hidden; color: #999; text-overflow: ellipsis; white-space: nowrap; font-size: 18px; line-height: normal; font-weight: 500; }
.chat-conversation-head { min-height: 64px; display: flex; align-items: center; gap: 12px; padding: 8px 16px; border-bottom: 1px solid var(--border); }
.chat-head-avatar { width: 44px; height: 44px; border: 1px solid #eee; border-radius: 50%; object-fit: cover; }
.chat-head-copy { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.chat-head-copy strong { overflow: hidden; color: #333; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; line-height: 22px; }
.chat-head-copy span { color: #999; font-size: 12px; line-height: 18px; }
.chat-more { width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: #f1f2f6; color: #999; cursor: pointer; }
.chat-back { display: none; width: 32px; height: 32px; place-items: center; padding: 0; border: 0; border-radius: 50%; background: #f1f2f6; }
.chat-back img { width: 24px; height: 24px; }
.chat-messages { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 12px; overflow-x: hidden; overflow-y: auto; padding: 16px 18px; background: #fff; }
.chat-day { display: flex; align-items: center; gap: 12px; color: #999; font-size: 12px; }
.chat-day::before, .chat-day::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.chat-message { display: flex; gap: 8px; align-items: flex-end; }
.chat-message.own { justify-content: flex-end; }
.chat-message-avatar { flex: 0 0 32px; width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.chat-bubble { position: relative; min-width: 0; max-width: min(70%,520px); display: flex; flex-direction: column; gap: 5px; padding: 10px 12px 8px; border-radius: 12px; background: #f1f2f6; color: #333; font-size: 14px; line-height: 20px; overflow-wrap: anywhere; }
.chat-message.own .chat-bubble { background: var(--orange-soft); }
.chat-author { color: #52c41a; font-size: 12px; font-weight: 600; }
.chat-message.own .chat-author { color: var(--orange); }
.chat-bubble p { min-width: 0; margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
.chat-message-time { align-self: flex-end; color: rgba(0,0,0,.45); font-size: 10px; line-height: 12px; }
.chat-message-time img { display: inline-block; width: 14px; height: 8px; margin-left: 4px; }
.chat-attachment { width: min(100%,300px); max-height: 220px; object-fit: cover; border-radius: 10px; }
.chat-link { color: var(--orange); text-decoration: underline; overflow-wrap: anywhere; }
.chat-reply { min-width: 0; padding: 8px; border-left: 3px solid var(--orange); border-radius: 6px; background: rgba(255,255,255,.72); font-size: 12px; overflow-wrap: anywhere; }
.chat-composer { min-height: 60px; display: flex; gap: 12px; align-items: center; padding: 8px 12px; border-top: 1px solid var(--border); background: #fff; }
.chat-composer input { min-width: 0; flex: 1; height: 40px; padding: 0 16px; border: 0; outline: 0; border-radius: 24px; background: #f1f2f6; color: #333; font-size: 14px; }
.chat-compose-action { flex: 0 0 36px; width: 36px; height: 36px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: #f1f2f6; cursor: pointer; }
.chat-compose-action img { width: 24px; height: 24px; }

.widgets-column { padding: 20px; border-left: 1px solid var(--border); }
.widget-list { display: flex; flex-direction: column; gap: 16px; }
.widget-card { position: relative; width: 100%; padding: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 16px; background: #fff; transition: transform .16s ease, box-shadow .16s ease, opacity .16s ease; }
.widget-card[draggable="true"] { cursor: default; }
.widget-card.drag-placeholder { opacity: .18; filter: saturate(.5); }
.widget-card.drag-ghost { position: fixed !important; z-index: 1000; margin: 0 !important; opacity: .62; pointer-events: none; box-shadow: 0 22px 50px rgba(0,0,0,.22), 0 4px 14px rgba(0,0,0,.12); transform: rotate(1.2deg) scale(1.012); transform-origin: center; transition: none; }
body.widget-drag-active, body.widget-drag-active * { cursor: grabbing !important; user-select: none !important; }
.widget-title { position: relative; z-index: 2; width: 100%; height: 49px; display: flex; gap: 12px; align-items: center; padding: 0 16px; border-bottom: 1px solid #eee; background: #fff; }
.widget-title > img { flex: 0 0 20px; width: 20px; height: 20px; cursor: grab; touch-action: none; -webkit-user-drag: none; user-select: none; }
.widget-title > img:active { cursor: grabbing; }
.widget-title h2 { min-width: 0; flex: 1; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: rgba(0,0,0,.88); font-size: 14px; line-height: normal; font-weight: 600; }
.widget-count { flex: 0 0 auto; color: rgba(0,0,0,.45); font-size: 14px; line-height: normal; }
.important-banner { height: 152px; display: flex; margin: 12px 16px 0; overflow: hidden; border-radius: 16px; background: linear-gradient(131deg,#f2fbff 3.47%,#acdefd 120.2%); }
.important-banner > div { flex: 0 0 180px; display: flex; flex-direction: column; gap: 20px; padding: 20px; }
.important-banner span { align-self: flex-start; padding: 8px 18px; border-radius: 18px; background: #fff; color: #000; font-size: 14px; line-height: normal; font-weight: 600; white-space: nowrap; }
.important-banner strong { color: #000; font-size: 16px; line-height: normal; font-weight: 600; }
.important-banner > img { min-width: 0; flex: 1; height: 152px; padding-top: 26px; object-fit: cover; object-position: left bottom; }
.carousel-control { height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; padding: 16px; }
.carousel-control button { flex: 0 0 24px; width: 24px; height: 24px; display: grid; place-items: center; padding: 0; border: 0; background: transparent; cursor: pointer; }
.carousel-control button img { width: 24px; height: 24px; }
.carousel-control > span { min-width: 0; flex: 1; display: flex; gap: 8px; justify-content: center; }
.carousel-control i { width: 16px; height: 3px; background: rgba(0,0,0,.13); }
.carousel-control i.on { width: 24px; background: var(--orange); }
.mission-card { height: 287px; padding-bottom: 16px; text-align: center; }
.mission-card .widget-title, .mission-card p { position: relative; z-index: 1; }
.mission-card .widget-title { text-align: left; }
.mission-art { position: absolute; z-index: 0; top: -8px; left: 19px; width: 300px; height: 230px; object-fit: fill; pointer-events: none; }
.mission-card p { position: absolute; right: 16px; bottom: 16px; left: 16px; margin: 0; color: rgba(0,0,0,.65); font-size: 14px; line-height: normal; }
.mail-list { display: flex; flex-direction: column; }
.mail-row { position: relative; height: 82px; display: flex; flex-direction: column; gap: 4px; justify-content: center; padding: 0 16px; border-bottom: 1px solid #eee; }
.mail-row.unread .mail-heading { padding-left: 16px; }
.mail-row.unread .mail-heading::before { content: ""; position: absolute; left: 0; top: 4px; width: 8px; height: 8px; border-radius: 4px; background: var(--orange); }
.mail-heading { position: relative; min-width: 0; display: flex; gap: 8px; align-items: center; }
.mail-heading b { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: rgba(0,0,0,.88); font-size: 14px; line-height: 17px; font-weight: 600; }
.mail-heading time { flex: 0 0 auto; color: rgba(0,0,0,.45); font-size: 12px; line-height: 17px; }
.mail-row > span, .mail-row > small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 400; }
.mail-row > span { color: rgba(0,0,0,.88); font-size: 14px; line-height: 17px; }
.mail-row > small { color: rgba(0,0,0,.45); font-size: 13px; line-height: 16px; }
.widget-footer { width: 100%; height: 50px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; border: 0; border-top: 1px solid #eee; background: #fff; color: var(--orange); font-size: 14px; font-weight: 500; cursor: pointer; }
.widget-footer img { width: 16px; height: 16px; }
.task-list { display: flex; flex-direction: column; }
.task-row { height: 68px; display: grid; grid-template-columns: 24px minmax(0,1fr) auto 16px; gap: 12px; align-items: center; padding: 0 16px; border-bottom: 1px solid #eee; }
.task-row > img:first-child { width: 24px; height: 24px; }
.task-row > img:last-child { width: 16px; height: 16px; }
.task-row > div { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.task-row b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: rgba(0,0,0,.88); font-size: 14px; line-height: normal; font-weight: 600; }
.task-row span { display: flex; gap: 5px; align-items: center; overflow: hidden; color: rgba(0,0,0,.45); text-overflow: ellipsis; white-space: nowrap; font-size: 14px; line-height: normal; }
.task-row span img { width: 16px; height: 16px; }
.task-row > strong { color: rgba(0,0,0,.45); font-size: 20px; line-height: normal; font-weight: 600; }
.meeting-timeline { position: relative; height: 240px; overflow: hidden; }
.meeting-row { height: 40px; display: grid; grid-template-columns: 36px minmax(0,1fr); gap: 16px; align-items: center; padding: 0 16px 0 15px; border-left: 3px solid #ccc; }
.meeting-row time, .meeting-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; line-height: 18px; }
.meeting-row time { color: rgba(0,0,0,.45); }
.meeting-row span { color: rgba(0,0,0,.88); }
.meeting-row.past { border-left-color: #eee; }
.meeting-row.past time { color: #ccc; }
.meeting-row.past span { color: rgba(0,0,0,.45); }
.meeting-row.active { border-left-color: var(--orange); }
.meeting-row.active time { color: var(--orange); font-weight: 600; }
.meeting-row.active span { font-weight: 600; }
.meeting-now { position: absolute; z-index: 2; top: 93px; left: 0; right: 0; height: 16px; display: flex; align-items: center; pointer-events: none; }
.meeting-now > i { flex: 0 0 8px; width: 8px; height: 8px; border-radius: 4px; background: var(--orange); }
.meeting-now > span { min-width: 0; flex: 1; height: 2px; margin: 0 6px; background: repeating-linear-gradient(90deg,var(--orange) 0 12px,transparent 12px 20px); }
.meeting-now > b { margin-right: 8px; padding: 2px 7px; border-radius: 999px; background: var(--orange); color: #fff; font-size: 10px; line-height: 12px; }
.useful-item { height: 58px; display: grid; grid-template-columns: 24px minmax(0,1fr) 16px; gap: 12px; align-items: center; padding: 0 16px; border-bottom: 1px solid #eee; }
.useful-item:last-child { border-bottom: 0; }
.useful-item > img { width: 24px; height: 24px; }
.useful-item > img:last-child { width: 16px; height: 16px; }
.useful-item div { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.useful-item b, .useful-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.useful-item b { color: rgba(0,0,0,.88); font-size: 14px; line-height: 17px; font-weight: 600; }
.useful-item span { color: rgba(0,0,0,.45); font-size: 13px; line-height: 16px; }
.promo-content { height: 130px; display: flex; align-items: center; gap: 20px; padding: 0 16px; }
.promo-content > b { flex: 0 0 174px; color: rgba(0,0,0,.88); font-size: 14px; line-height: 24px; font-weight: 600; }
.promo-content > div { min-width: 0; flex: 1; display: flex; flex-direction: column; align-items: flex-start; }
.promo-content b { font-size: 14px; line-height: 24px; }
.promo-content em { color: var(--orange); font-size: 14px; font-style: normal; font-weight: 500; }
.promo-content img { width: 106px; height: 108px; object-fit: contain; }
.magazine-content { height: 134px; padding: 0 20px; }
.magazine-content > div { justify-content: center; }
.magazine-content > div b { font-size: 16px; font-weight: 700; }
.magazine-content img { width: 140px; height: 120px; }
.safety-widget { height: 341px; }
.safety-caption { height: 32px; margin: 0; padding: 16px 16px 0; color: rgba(0,0,0,.45); font-size: 12px; line-height: 16px; }
.safety-total { height: 156px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.safety-total strong { color: var(--orange); font-size: 56px; line-height: 56px; letter-spacing: -1.68px; }
.safety-total span { color: rgba(0,0,0,.45); font-size: 13px; line-height: normal; }
.safety-stats { height: 103px; display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid #eee; }
.safety-stats > div { min-width: 0; display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; }
.safety-stats > div + div { border-left: 1px solid #eee; }
.safety-stats img { width: 20px; height: 20px; }
.safety-stats b { color: rgba(0,0,0,.88); font-size: 20px; line-height: 22px; }
.safety-stats small { color: rgba(0,0,0,.45); font-size: 12px; line-height: 16px; }
.mobile-nav { display: none; }
.sidebar-overlay { display: none; }

@media (max-width: 1199px) {
  .topbar { width: 100%; grid-template-columns: 200px minmax(300px, 540px) 180px; column-gap: 0; justify-content: space-between; }
  .header-left, .searchbox, .user-actions { width: auto; }
  .burger-button { display: block; }
  .portal-layout { grid-template-columns: minmax(0, 1fr) 380px; }
  .sidebar { position: fixed; z-index: 90; top: 0; bottom: 0; left: 0; width: 280px; display: block; overflow-x: hidden; overflow-y: auto; border-right: 0; box-shadow: 12px 0 32px rgba(0,0,0,.08); transform: translateX(-105%); transition: transform .22s ease; }
  body.sidebar-open { overflow: hidden; }
  body.sidebar-open .sidebar { transform: translateX(0); }
  .sidebar-overlay { position: fixed; z-index: 80; inset: 0; display: block; border: 0; background: rgba(0,0,0,.52); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .22s ease, visibility .22s ease; }
  body.sidebar-open .sidebar-overlay { opacity: 1; visibility: visible; pointer-events: auto; }
  .feed { grid-column: 1; }
  .widgets-column { grid-column: 2; }
  .widgets-page { grid-column: 1 / -1; }
  .chats-page { grid-column: 1 / -1; }
  .publication-page { grid-column: 1 / -1; }
}

@media (max-width: 991px) {
  body { padding-bottom: 64px; }
  .topbar { height: 60px; grid-template-columns: auto minmax(0,1fr) auto; gap: 16px; padding: 10px 16px; }
  .header-left { width: auto; }
  .brand { width: 38px; }
  .searchbox { justify-self: end; width: 32px; height: 32px; justify-content: center; padding: 0; border: 1px solid rgba(0,0,0,.15); border-radius: 50%; background: transparent; cursor: pointer; }
  .searchbox img { width: 16px; height: 16px; }
  .searchbox input { display: none; }
  .notification { display: grid; }
  .user-actions { width: auto; gap: 12px; }
  .profile-avatar { width: 36px; height: 36px; }
  .portal-layout { display: block; width: 100%; max-width: none; }
  .feed { padding: 16px; }
  .widgets-column { padding: 4px 16px 16px; border: 0; }
  .widgets-page { padding: 16px; }
  .chats-page { padding: 16px; }
  .publication-page { padding: 0 0 64px; }
  .chats-shell { grid-template-columns: 330px minmax(0,1fr); }
  .widgets-manager-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px; }
  .widget-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; }
  .post-card { grid-template-columns: minmax(0,1fr) 160px; }
  .post-image { width: 160px; }
  .mobile-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; height: 64px; display: grid; grid-template-columns: repeat(4,1fr); border-top: 1px solid var(--border); background: rgba(255,255,255,.97); backdrop-filter: blur(12px); }
  .mobile-nav a { display: flex; flex-direction: column; gap: 3px; align-items: center; justify-content: center; color: #999; font-size: 11px; }
  .mobile-nav a.active { color: var(--orange); }
  .mobile-nav img, .mobile-nav a > span:first-child { width: 21px; height: 21px; object-fit: contain; }
}

@media (max-width: 620px) {
  .feed { padding: 12px 8px; }
  .widgets-page { padding: 12px 8px; }
  .widgets-manager { gap: 20px; padding: 16px; border-radius: 20px; }
  .widgets-manager-grid { grid-template-columns: 1fr; gap: 20px; }
  .chats-page { padding: 0; }
  .chats-shell { height: calc(100vh - 124px); min-height: 0; display: block; border: 0; border-radius: 0; }
  .chat-sidebar, .chat-conversation { width: 100%; height: 100%; border: 0; }
  .chat-conversation { display: none; }
  .chats-shell.conversation-open .chat-sidebar { display: none; }
  .chats-shell.conversation-open .chat-conversation { display: flex; }
  .chat-back { display: grid; }
  .chat-sidebar-head h1 { font-size: 22px; }
  .chat-bubble { max-width: 82%; }
  .publication-page { padding: 0 0 44px; }
  .publication-content-header { height: 64px; padding: 8px 16px 0; }
  .publication-breadcrumbs { display: none; }
  .publication-back { height: 56px; padding: 8px 0 12px; font-size: 16px; line-height: 24px; }
  .publication-back-icon { width: 32px; height: 32px; flex-basis: 32px; }
  .publication-back-icon img { width: 22px; height: 22px; }
  .publication-article { width: calc(100% - 32px); margin-top: 28px; }
  .publication-heading h1 { font-size: 22px; line-height: 28px; }
  .publication-hero { height: 54vw; min-height: 210px; }
  .publication-body { gap: 16px; font-size: 16px; }
  .publication-comments { margin-top: 32px; padding-top: 32px; }
  .publication-comments > h2, .publication-related > h2 { font-size: 21px; }
  .publication-comment-form { flex-wrap: wrap; }
  .publication-comment-form input { flex-basis: calc(100% - 52px); }
  .publication-submit { margin-left: auto; }
  .publication-related-grid { grid-template-columns: 1fr; gap: 16px; }
  .feed-tabs { min-height: 52px; gap: 6px; padding: 6px; }
  .feed-tab { height: 40px; gap: 7px; padding: 0 8px; font-size: 12px; }
  .feed-tab img { width: 16px; height: 16px; }
  .stories { min-height: 116px; gap: 6px; padding: 12px 8px; border-radius: 20px; }
  .circle-arrow { display: none; }
  .story-track { gap: 4px; }
  .story { flex-basis: 70px; }
  .story-visual { width: 68px; height: 68px; }
  .story-visual img { width: 60px; height: 60px; }
  .post-list { gap: 8px; }
  .channels-grid { grid-template-columns: 1fr; gap: 12px; }
  .events-grid { grid-template-columns: 1fr; gap: 12px; }
  .channel-card { height: 208px; }
  .channel-cover { height: 120px; }
  .post-card { min-height: 0; grid-template-columns: minmax(0,1fr) 104px; grid-template-rows: 32px auto; gap: 10px; padding: 12px; border-radius: 18px; }
  .post-card.has-image, .post-card.no-image { min-height: 0; }
  .post-card-header { gap: 8px; }
  .post-copy { gap: 8px; }
  .post-meta { gap: 6px; font-size: 11px; }
  .post-meta b { font-size: 12px; }
  .post-pin-mark { width: 14px; height: 14px; }
  .post-more-menu { top: 36px; }
  .post-title { font-size: 14px; }
  .post-description { display: -webkit-box; overflow: hidden; font-size: 12px; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .post-image { width: 104px; height: 96px; border-radius: 12px; }
  .audit-row { grid-column: 1 / -1; }
  .audit-person { gap: 6px; }
  .audit-person img { width: 28px; height: 28px; }
  .audit-person span { font-size: 10px; }
  .audit-person b { font-size: 11px; }
  .audit-details { grid-column: 1 / -1; flex-wrap: wrap; font-size: 11px; }
  .stars img { width: 16px; height: 16px; }
  .widgets-column { padding: 4px 8px 12px; }
  .widget-list { display: flex; }
  .widget-card { padding: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

/* Concept v2: compact navigation rail and updated header */
.rail-brand,
.rail-shortcuts,
.rail-account { display: none; }
.rail-icon { position: relative; flex: 0 0 24px; width: 24px; height: 24px; display: grid; place-items: center; }
.rail-icon > img { width: 24px; height: 24px; object-fit: contain; }
.rail-icon.nav-icon-wrap b { left: 14px; top: -10px; }
.header-chat { flex: 0 0 32px; }

.header-chat-popover {
  position: fixed;
  z-index: 90;
  top: 76px;
  right: 16px;
  bottom: 16px;
  width: 375px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 0 16px rgba(0,0,0,.24);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-8px) scale(.985);
  transform-origin: top right;
  transition: opacity .18s ease, visibility .18s ease, transform .18s ease;
}
body.header-chat-open .header-chat-popover {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}
body.header-chat-open .header-chat { background: #f1f2f6; }
.header-chat-list-view { min-height: 0; height: 100%; display: flex; flex-direction: column; }
.header-chat-conversation-view { min-height: 0; height: 100%; display: none; flex-direction: column; background: #fff; }
.header-chat-popover.conversation-view .header-chat-list-view { display: none; }
.header-chat-popover.conversation-view .header-chat-conversation-view { display: flex; }
.header-chat-popover-head {
  flex: 0 0 56px;
  height: 56px;
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  background: #fff;
}
.header-chat-popover-head h2 {
  min-width: 0;
  flex: 1;
  margin: 0;
  color: rgba(0,0,0,.88);
  font-size: 20px;
  line-height: 28px;
  font-weight: 600;
}
.header-chat-popover-actions { display: flex; gap: 12px; align-items: center; }
.header-chat-popover-action {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #f1f2f6;
  cursor: pointer;
}
.header-chat-popover-action.primary { background: var(--orange); }
.header-chat-popover-action img { width: 20px; height: 20px; }
.header-chat-popover-action:hover { filter: brightness(.97); }
.header-chat-popover-action:focus-visible { outline: 2px solid rgba(var(--brand-rgb,10,33,79),.34); outline-offset: 2px; }
.header-chat-popover-search {
  position: relative;
  flex: 0 0 61px;
  height: 61px;
  display: flex;
  align-items: center;
  padding: 8px 16px;
  background: #fff;
}
.header-chat-popover-search > img {
  position: absolute;
  z-index: 1;
  left: 32px;
  top: 20px;
  width: 20px;
  height: 20px;
  pointer-events: none;
}
.header-chat-popover-search input {
  width: 100%;
  height: 45px;
  padding: 0 16px 0 52px;
  border: 0;
  outline: 0;
  border-radius: 56px;
  background: #f1f2f6;
  color: #333;
  font-size: 18px;
  line-height: 25px;
}
.header-chat-popover-search input::placeholder { color: #999; opacity: 1; }
.header-chat-popover-list { min-height: 0; flex: 1; overflow-x: hidden; overflow-y: auto; background: #fff; scrollbar-width: none; }
.header-chat-popover-list::-webkit-scrollbar { display: none; }
.header-chat-popover-contact {
  width: 100%;
  height: 76px;
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 16px;
  border: 0;
  background: #fff;
  text-align: left;
  cursor: pointer;
}
.header-chat-popover-contact:hover { background: #fafafa; }
.header-chat-popover-contact.active,
.header-chat-popover-contact.active:hover { background: var(--orange-soft); }
.header-chat-popover-contact:focus-visible { position: relative; z-index: 1; outline: 2px solid rgba(var(--brand-rgb,10,33,79),.32); outline-offset: -2px; }
.header-chat-popover-avatar {
  position: relative;
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  overflow: visible;
  border: 1px solid #eee;
  border-radius: 50%;
  background: #f1f2f6;
}
.header-chat-popover-avatar > img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.header-chat-popover-online { position: absolute; right: 1px; bottom: 1px; width: 12px; height: 12px; border: 3px solid #fff; border-radius: 50%; background: #00b578; }
.header-chat-popover-copy { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.header-chat-popover-title { min-width: 0; display: flex; gap: 4px; align-items: center; }
.header-chat-popover-title strong { overflow: hidden; color: #333; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; line-height: 18px; font-weight: 500; }
.header-chat-popover-title img { flex: 0 0 16px; width: 16px; height: 16px; }
.header-chat-popover-preview { min-width: 0; display: flex; gap: 16px; align-items: center; }
.header-chat-popover-message { min-width: 0; flex: 1; display: flex; gap: 4px; align-items: center; overflow: hidden; color: #999; font-size: 14px; line-height: 22px; }
.header-chat-popover-message img { flex: 0 0 14px; width: 14px; height: 14px; }
.header-chat-popover-message span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.header-chat-popover-message b { flex: 0 0 auto; font-weight: 500; }
.header-chat-popover-preview time { flex: 0 0 auto; color: #999; font-size: 14px; line-height: 17px; letter-spacing: -.56px; white-space: nowrap; font-feature-settings: "lnum" 1,"tnum" 1; }
.header-chat-popover-unread { flex: 0 0 20px; width: 20px; height: 20px; }

.header-chat-conversation-head {
  flex: 0 0 64px;
  height: 64px;
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #eee;
  background: #fff;
}
.header-chat-conversation-action {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #f1f2f6;
  cursor: pointer;
}
.header-chat-conversation-action img { width: 24px; height: 24px; }
.header-chat-conversation-action#headerChatVoice img { width: 20px; height: 20px; }
.header-chat-conversation-action:focus-visible { outline: 2px solid rgba(var(--brand-rgb,10,33,79),.34); outline-offset: 2px; }
.header-chat-conversation-avatar { flex: 0 0 40px; width: 40px; height: 40px; border: 1px solid #eee; border-radius: 50%; object-fit: cover; }
.header-chat-conversation-copy { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.header-chat-conversation-copy strong { overflow: hidden; color: #333; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; line-height: 18px; font-weight: 600; }
.header-chat-conversation-copy span { color: #999; font-size: 12px; line-height: 20px; font-weight: 500; }
.header-chat-conversation-messages {
  min-height: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 16px 24px 24px;
  background: #fff;
  scrollbar-width: none;
}
.header-chat-conversation-messages::-webkit-scrollbar { display: none; }
.header-chat-conversation-composer {
  flex: 0 0 60px;
  min-height: 60px;
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 10px 16px;
  border-top: 1px solid #eee;
  background: #fff;
}
.header-chat-composer-action {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #f1f2f6;
  cursor: pointer;
}
.header-chat-composer-action img { width: 24px; height: 24px; }
.header-chat-composer-action:hover { background: #eee; }
.header-chat-composer-action:focus-visible { outline: 2px solid rgba(var(--brand-rgb,10,33,79),.34); outline-offset: 2px; }
.header-chat-conversation-composer input {
  min-width: 0;
  flex: 1;
  height: 40px;
  padding: 0 16px;
  border: 0;
  outline: 0;
  border-radius: 54px;
  background: #f1f2f6;
  color: #333;
  font: inherit;
  font-size: 14px;
  line-height: 20px;
}
.header-chat-conversation-composer input::placeholder { color: #999; opacity: 1; }
.header-chat-conversation-composer input:focus { box-shadow: inset 0 0 0 1px rgba(var(--brand-rgb,10,33,79),.32); }
.header-chat-internal-day { display: flex; gap: 8px; align-items: center; color: #999; font-size: 14px; line-height: 22px; font-weight: 500; text-align: center; }
.header-chat-internal-day::before,
.header-chat-internal-day::after { content: ""; min-width: 0; flex: 1; height: 1px; background: #eee; }
.header-chat-internal-block { display: flex; flex-direction: column; gap: 4px; }
.header-chat-internal-row { width: 100%; display: flex; align-items: flex-end; }
.header-chat-internal-row.own { justify-content: flex-end; }
.header-chat-internal-message { max-width: 100%; display: flex; gap: 12px; align-items: flex-end; }
.header-chat-internal-avatar {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: #d9f7be;
  color: #52c41a;
  font-size: 15px;
  line-height: 18px;
  font-weight: 500;
}
.header-chat-internal-avatar.placeholder { opacity: 0; }
.header-chat-internal-avatar img { width: 100%; height: 100%; object-fit: cover; }
.header-chat-internal-bubble {
  position: relative;
  width: 248px;
  min-height: 58px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 10px 26px;
  overflow: hidden;
  border: 1px solid #eee;
  border-radius: 12px;
  background: #f1f2f6;
  color: #333;
  font-size: 14px;
  line-height: 20px;
}
.header-chat-internal-bubble.wide { width: 268px; }
.header-chat-internal-bubble.compact { width: 222px; padding-left: 14px; padding-right: 14px; }
.header-chat-internal-bubble.figma-first,
.header-chat-internal-bubble.figma-link { height: 76px; }
.header-chat-internal-bubble.figma-own { height: 80px; }
.header-chat-internal-bubble.figma-reply { height: 156px; }
.header-chat-internal-bubble.figma-long { height: 178px; }
.header-chat-internal-bubble.attachment { width: 248px; height: 200px; padding: 0; background: #fff; }
.header-chat-internal-bubble.attachment > img { position: absolute; inset: 0; width: 105.54%; height: 102.9%; object-fit: cover; }
.header-chat-internal-bubble.attachment time { right: 3px; bottom: 3px; padding: 2px 6px; border-radius: 32px; background: rgba(0,0,0,.4); color: #fff; }
.header-chat-internal-row.own .header-chat-internal-bubble { width: 232px; border: 0; border-top-right-radius: 0; background: var(--orange-soft); }
.header-chat-internal-bubble a { display: block; overflow: hidden; color: var(--orange); text-overflow: ellipsis; text-decoration: underline; white-space: nowrap; }
.header-chat-internal-author { color: #52c41a; font-size: 12px; line-height: 15px; font-weight: 600; }
.header-chat-internal-row.own .header-chat-internal-author { color: var(--orange); font-size: 14px; line-height: 22px; }
.header-chat-internal-bubble p { margin: 0; }
.header-chat-internal-bubble time { position: absolute; right: 10px; bottom: 8px; color: rgba(0,0,0,.45); font-size: 10px; line-height: 12px; font-weight: 500; white-space: nowrap; }
.header-chat-internal-bubble time img { display: inline-block; width: 14px; height: 8px; margin-left: 4px; vertical-align: middle; }
.header-chat-internal-quote { display: flex; flex-direction: column; gap: 8px; padding: 8px 10px; border-left: 3px solid #eb2f96; border-radius: 2px 8px 8px 2px; background: #fff; color: #475467; font-size: 12px; line-height: 16px; }
.header-chat-internal-quote strong { color: #eb2f96; font-size: 12px; line-height: 15px; }
.header-chat-internal-quote.green { border-left-color: #52c41a; }
.header-chat-internal-quote.green strong { color: #52c41a; }

@media (max-width: 500px) {
  .header-chat-popover { top: 68px; right: 8px; bottom: 72px; left: 8px; width: auto; }
}

/* Interactive chat states shared by the header panel and the full chat page */
.chat-bot-control[hidden],
.chat-compose-context[hidden],
.chat-attachment-menu[hidden],
.chat-modal[hidden],
.chat-action-overlay[hidden],
.chat-selection-actions[hidden],
.chat-create-step[hidden],
.chat-create-panel[hidden],
.chat-toast[hidden] { display: none !important; }

.chat-selection-actions {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--border);
  background: #fff;
  box-shadow: 0 -8px 18px rgba(17,24,39,.04);
}
.chat-selection-actions button { min-width: 0; height: 40px; padding: 0 12px; border: 1px solid var(--border); border-radius: 22px; background: #fff; color: #333; font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; }
.chat-selection-actions button:last-child { border-color: #ffd5d2; color: #d92d20; }
.chat-selection-actions button:disabled { border-color: var(--border); color: #b8b8b8; cursor: default; }
.chat-selection-done { color: inherit; font-size: 18px; line-height: 1; font-weight: 700; }
.chat-select-circle { flex: 0 0 24px; width: 24px; height: 24px; display: grid; place-items: center; border: 1.5px solid #c9cdd3; border-radius: 50%; background: #fff; color: #fff; font-size: 13px; font-weight: 700; }
.chat-contact.selected .chat-select-circle,
.header-chat-popover-contact.selected .chat-select-circle,
.chat-directory-row.selected .chat-select-circle { border-color: var(--orange); background: var(--orange); }
.chat-contact.selection-disabled,
.header-chat-popover-contact.selection-disabled { opacity: .4; cursor: default; }
.chat-contact.selecting { gap: 10px; }
.header-chat-popover-contact.selecting { gap: 10px; }

.chat-bot-control {
  color: #333;
  font-size: 20px;
  line-height: 1;
  font-weight: 600;
}

.chat-contact-title-row em {
  padding: 1px 6px;
  border-radius: 8px;
  background: var(--orange-soft);
  color: var(--orange);
  font-size: 10px;
  line-height: 16px;
  font-style: normal;
  font-weight: 700;
}
.chat-contact.bot .chat-contact-avatar > img,
.header-chat-popover-contact[data-header-chat-id="ergiz"] .header-chat-popover-avatar > img,
.header-chat-conversation-avatar[src*="ergiz-avatar"],
.chat-head-avatar[src*="ergiz-avatar"] { padding: 0; background: #fff4e8; object-fit: contain; }

.header-chat-conversation-composer,
.chat-composer { position: relative; }

.chat-compose-context {
  min-height: 54px;
  display: grid;
  grid-template-columns: 24px minmax(0,1fr) 28px;
  gap: 8px;
  align-items: center;
  padding: 8px 16px;
  border-top: 1px solid var(--border);
  background: #fffaf5;
  color: var(--orange);
}
.chat-compose-context > span:first-child { display: grid; place-items: center; font-size: 20px; }
.chat-compose-context > span:nth-child(2) { min-width: 0; display: flex; flex-direction: column; }
.chat-compose-context b { font-size: 12px; line-height: 16px; }
.chat-compose-context small { overflow: hidden; color: #667085; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; line-height: 16px; }
.chat-compose-context button { width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #999; font-size: 22px; cursor: pointer; }
.chat-compose-context button:hover { background: #f2ece7; }

.chat-attachment-menu {
  position: absolute;
  z-index: 12;
  left: 12px;
  bottom: 56px;
  width: 156px;
  display: flex;
  flex-direction: column;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(17,24,39,.16);
}
.chat-attachment-menu button { padding: 9px 10px; border: 0; border-radius: 8px; background: transparent; color: #333; text-align: left; font: inherit; font-size: 13px; cursor: pointer; }
.chat-attachment-menu button:hover { background: #f1f2f6; }

.chat-submit-action.has-text { background: var(--orange); color: #fff; }
.chat-submit-action.has-text:hover { background: #dd6f12; }
.chat-submit-action > span { transform: translateX(1px) rotate(-8deg); font-size: 17px; }

.chat-pinned-bar {
  position: sticky;
  z-index: 7;
  top: -16px;
  width: 100%;
  display: grid;
  grid-template-columns: 24px minmax(0,1fr) 24px;
  gap: 8px;
  align-items: center;
  padding: 9px 12px;
  border: 1px solid #f4d5b8;
  border-radius: 12px;
  background: rgba(255,250,245,.96);
  color: var(--orange);
  text-align: left;
  box-shadow: 0 4px 16px rgba(17,24,39,.06);
  cursor: pointer;
  backdrop-filter: blur(10px);
}
.chat-pinned-bar > span:nth-child(2) { min-width: 0; display: flex; flex-direction: column; }
.chat-pinned-bar b { font-size: 12px; line-height: 16px; }
.chat-pinned-bar small { overflow: hidden; color: #667085; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; line-height: 15px; }
.chat-pinned-bar em { min-width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; background: var(--orange); color: #fff; font-size: 10px; font-style: normal; }

.chat-bubble,
.header-chat-internal-bubble { overflow: visible; }
.chat-bubble.is-pinned,
.header-chat-internal-bubble.is-pinned { box-shadow: inset 3px 0 var(--orange); }
.chat-message-menu-trigger {
  position: absolute;
  z-index: 4;
  top: 4px;
  right: 6px;
  width: 24px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: rgba(255,255,255,.85);
  color: #7a7a7a;
  font-size: 12px;
  cursor: pointer;
}
.chat-bubble > p,
.header-chat-internal-bubble > p { padding-right: 18px; }
.chat-message-menu {
  position: absolute;
  z-index: 30;
  top: 28px;
  right: 6px;
  width: 158px;
  display: none;
  flex-direction: column;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(17,24,39,.2);
}
.chat-message-menu.open { display: flex; }
.chat-message-menu button { padding: 8px 10px; border: 0; border-radius: 7px; background: transparent; color: #333; text-align: left; font: inherit; font-size: 12px; line-height: 16px; cursor: pointer; }
.chat-message-menu button:hover { background: #f1f2f6; }
.chat-message-menu button.danger { color: #d92d20; }
.chat-reactions { position: absolute; z-index: 3; right: 8px; bottom: -12px; display: flex; gap: 4px; }
.chat-reaction-chip { min-width: 28px; height: 24px; padding: 0 7px; border: 1px solid #f4d5b8; border-radius: 14px; background: #fff; font-size: 13px; cursor: pointer; box-shadow: 0 2px 6px rgba(0,0,0,.08); }
.chat-message:has(.chat-reactions),
.header-chat-internal-row:has(.chat-reactions) { margin-bottom: 10px; }
.chat-forwarded { color: var(--orange); font-size: 10px; line-height: 13px; font-weight: 600; }
.chat-edited { align-self: flex-end; margin-right: 42px; color: #999; font-size: 9px; line-height: 11px; }

.chat-file-card { min-width: 180px; display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: 10px; background: rgba(255,255,255,.76); }
.chat-file-card > span { flex: 0 0 34px; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; background: #fff; color: var(--orange); font-size: 20px; }
.chat-file-card b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }

.chat-ergiz-prompts { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; padding: 4px 0 8px; }
.chat-ergiz-prompts button { padding: 8px 12px; border: 1px solid #f0c79f; border-radius: 18px; background: #fffaf5; color: #a14e0b; font: inherit; font-size: 12px; cursor: pointer; }
.chat-ergiz-prompts button:hover { border-color: var(--orange); background: var(--orange-soft); }
.chat-typing { width: auto !important; min-width: 54px !important; min-height: 36px !important; flex-direction: row !important; gap: 4px !important; align-items: center; justify-content: center; padding: 10px 12px !important; }
.chat-typing i { width: 6px; height: 6px; border-radius: 50%; background: #aaa; animation: chatTyping 1.1s infinite ease-in-out; }
.chat-typing i:nth-child(2) { animation-delay: .15s; }
.chat-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes chatTyping { 0%,60%,100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-3px); opacity: 1; } }

.chat-modal { position: fixed; z-index: 220; inset: 0; display: grid; place-items: center; padding: 20px; }
.chat-modal-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: rgba(17,24,39,.36); cursor: default; }
.chat-modal-card { position: relative; z-index: 1; width: min(100%,380px); max-height: min(620px,calc(100vh - 40px)); display: flex; flex-direction: column; overflow: hidden; border-radius: 18px; background: #fff; box-shadow: 0 24px 64px rgba(17,24,39,.28); }
.chat-modal-card > header { min-height: 58px; display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.chat-modal-card h2 { min-width: 0; flex: 1; margin: 0; color: #171a1f; font-size: 18px; line-height: 24px; }
.chat-modal-card > header > button { width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; background: #f1f2f6; color: #666; font-size: 22px; cursor: pointer; }
.chat-modal-list,
.chat-history-list { min-height: 0; overflow-y: auto; padding: 8px; }
.chat-modal-list > button,
.chat-history-list > button { width: 100%; display: flex; gap: 12px; align-items: center; padding: 10px; border: 0; border-radius: 12px; background: #fff; color: #333; text-align: left; cursor: pointer; }
.chat-modal-list > button:hover,
.chat-history-list > button:hover { background: #f7f7f7; }
.chat-modal-list img { flex: 0 0 42px; width: 42px; height: 42px; padding: 2px; border: 1px solid var(--border); border-radius: 50%; object-fit: cover; }
.chat-modal-list span,
.chat-history-list span { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.chat-modal-list b,
.chat-history-list b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.chat-modal-list small,
.chat-history-list small { overflow: hidden; color: #999; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.chat-history-list i { color: #999; font-size: 20px; font-style: normal; }
.chat-confirm-card { padding-bottom: 16px; }
.chat-confirm-card > header { border-bottom: 0; padding-bottom: 0; }
.chat-confirm-card > p { margin: 0; padding: 4px 16px 20px; color: #667085; font-size: 14px; line-height: 20px; }
.chat-confirm-actions { display: flex; gap: 8px; justify-content: flex-end; padding: 0 16px; }
.chat-confirm-actions button { min-width: 90px; height: 38px; padding: 0 16px; border: 1px solid var(--border); border-radius: 10px; background: #fff; color: #333; font: inherit; cursor: pointer; }
.chat-confirm-actions button.danger { border-color: #d92d20; background: #d92d20; color: #fff; }
.chat-create-panel { width: 100%; min-height: 0; height: 100%; display: flex; overflow: hidden; background: #fff; }
.chat-create-card { width: 100%; height: 100%; max-height: none; border-radius: 0; box-shadow: none; }
.chat-create-card > header { min-height: 64px; }
.chat-create-card > header > .chat-create-back { flex: 0 0 40px; width: 40px; height: 40px; background: #f1f2f6; color: #999; }
.chat-create-card > header > .chat-create-back img { width: 24px; height: 24px; }
.chat-create-spacer { flex: 0 0 40px; width: 40px; height: 40px; }
.chat-create-step { min-height: 0; flex: 1; display: flex; flex-direction: column; }
.chat-create-search-row { height: 56px; display: flex; gap: 12px; align-items: center; padding: 0 16px 12px; }
.chat-create-search { min-width: 0; height: 44px; flex: 1; display: flex; gap: 8px; align-items: center; padding: 0 16px; border-radius: 999px; background: #f1f2f6; }
.chat-create-search.standalone { margin: 12px 16px 8px; }
.chat-create-search > img { flex: 0 0 24px; width: 24px; height: 24px; margin: 0; color: #999; opacity: 1; }
.chat-create-card .chat-create-search input { min-width: 0; width: 100%; height: 44px; padding: 0; border: 0; outline: 0; background: transparent; color: #333; font: inherit; font-size: 14px; font-weight: 400; }
.chat-create-card input::placeholder { color: #9a9da3; }
.chat-create-structure { flex: 0 0 44px; width: 44px; height: 44px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: #f1f2f6; color: #999; cursor: pointer; }
.chat-create-structure img { width: 24px; height: 24px; }
.chat-create-group-row { width: 100%; height: 49px; flex: 0 0 49px; display: flex; gap: 12px; align-items: center; margin: 0; padding: 8px 16px 16px; border: 0; border-radius: 0; background: #fff; color: #333; text-align: left; cursor: pointer; }
.chat-create-group-row:hover { background: var(--primary-bg); }
.chat-create-group-row > span { flex: 0 0 24px; width: 24px; height: 24px; display: grid; place-items: center; color: var(--orange); }
.chat-create-group-row > span img { width: 24px; height: 24px; }
.chat-create-group-row b { font-size: 14px; font-weight: 500; }
.chat-create-group-row em { flex: 0 0 20px; width: 20px; height: 20px; margin-left: auto; color: #999; font-size: 0; font-style: normal; }
.chat-create-group-row em img { width: 20px; height: 20px; }
.chat-create-directory { min-height: 0; flex: 1; overflow-y: auto; padding: 4px 8px 12px; }
.chat-directory-row { width: 100%; min-height: 68px; display: flex; gap: 11px; align-items: center; padding: 8px; border: 0; border-radius: 12px; background: #fff; color: #333; text-align: left; cursor: pointer; }
.chat-directory-row:hover { background: #f8f8f8; }
.chat-directory-avatar { flex: 0 0 48px; width: 48px; height: 48px; overflow: hidden; border: 1px solid #eee; border-radius: 50%; background: #f6f6f6; }
.chat-directory-avatar img { width: 100%; height: 100%; object-fit: cover; }
.chat-directory-row > span:not(.chat-select-circle):not(.chat-directory-avatar) { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.chat-directory-row b { overflow: hidden; color: #25282e; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; line-height: 19px; font-weight: 500; }
.chat-directory-row b em { color: #9a9da3; font-size: 12px; font-style: normal; font-weight: 400; }
.chat-directory-row small { overflow: hidden; color: #8b8f96; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; line-height: 17px; }
.chat-directory-row > i { flex: 0 0 auto; color: #a0a3a8; font-size: 17px; font-style: normal; }
.chat-directory-row.selectable { min-height: 62px; }
.chat-directory-row.selectable .chat-directory-avatar { flex-basis: 44px; width: 44px; height: 44px; }
.chat-create-empty { min-height: 60%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 32px 20px; color: #999; text-align: center; }
.chat-create-empty.compact { min-height: 180px; padding-bottom: 36px; }
.chat-create-empty-icons { height: 76px; display: flex; align-items: center; justify-content: center; margin-bottom: 8px; }
.chat-create-empty-icons i { width: 60px; height: 60px; display: grid; place-items: center; margin-right: -14px; border: 5px solid #fff; border-radius: 50%; background: #f1f2f6; color: #333; font-style: normal; }
.chat-create-empty-icons i:first-child { margin-left: 0; }
.chat-create-empty-icons i:last-child { margin-right: 0; }
.chat-create-empty-icons i:nth-child(2) { position: relative; z-index: 1; width: 76px; height: 76px; background: var(--primary-bg); color: var(--orange); }
.chat-create-empty-icons img { width: 24px; height: 24px; }
.chat-create-empty b { color: #333; font-size: 18px; line-height: normal; font-weight: 600; }
.chat-create-empty small { max-width: 320px; color: #999; font-size: 14px; line-height: 19.6px; }
.chat-group-selected { display: flex; gap: 10px; overflow-x: auto; padding: 4px 16px 10px; scrollbar-width: none; }
.chat-group-selected:empty { display: none; }
.chat-group-selected::-webkit-scrollbar { display: none; }
.chat-group-selected button { position: relative; flex: 0 0 58px; width: 58px; display: flex; flex-direction: column; gap: 4px; align-items: center; padding: 0; border: 0; background: transparent; color: #555; cursor: pointer; }
.chat-group-selected img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.chat-group-selected span { width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; text-align: center; }
.chat-group-selected i { position: absolute; top: -2px; right: 2px; width: 17px; height: 17px; display: grid; place-items: center; border: 2px solid #fff; border-radius: 50%; background: #777; color: #fff; font-size: 12px; line-height: 1; font-style: normal; }
.chat-create-footer { min-height: 66px; display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 12px 16px; border-top: 1px solid var(--border); background: #fff; color: #777b82; font-size: 13px; }
.chat-create-footer button { min-width: 108px; height: 40px; padding: 0 17px; border: 0; border-radius: 22px; background: #ededed; color: #aaa; font: inherit; font-weight: 500; cursor: default; }
.chat-create-footer button.primary:not(:disabled) { background: var(--orange); color: #fff; cursor: pointer; }
.chat-group-details { gap: 18px; align-items: center; padding: 26px 20px 0; }
.chat-group-avatar { position: relative; width: 82px; height: 82px; display: grid; place-items: center; border: 0; border-radius: 50%; background: #fff0e2; color: var(--orange); font-size: 30px; cursor: pointer; }
.chat-group-avatar > span { width: 32px; height: 32px; display: grid; place-items: center; }
.chat-group-avatar > span img { width: 32px; height: 32px; }
.chat-group-avatar em { position: absolute; right: 1px; bottom: 1px; width: 25px; height: 25px; display: grid; place-items: center; border: 3px solid #fff; border-radius: 50%; background: var(--orange); color: #fff; font-size: 17px; line-height: 1; font-style: normal; }
.chat-group-avatar em img { width: 14px; height: 14px; }
.chat-group-details > label { width: 100%; display: flex; flex-direction: column; gap: 7px; color: #555960; font-size: 13px; font-weight: 600; }
.chat-group-details > label input { width: 100%; height: 44px; padding: 0 13px; border: 1px solid #dedede; border-radius: 11px; outline: 0; background: #fff; color: #171a1f; font: inherit; font-size: 14px; font-weight: 400; }
.chat-group-details > label input:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(239,125,24,.14); }
.chat-group-summary { width: 100%; min-height: 0; flex: 1; display: flex; flex-direction: column; gap: 10px; overflow: hidden; }
.chat-group-summary > b { color: #333; font-size: 14px; }
.chat-group-summary > div { display: flex; flex-direction: column; overflow-y: auto; }
.chat-group-summary > div > span { display: flex; gap: 10px; align-items: center; padding: 7px 2px; }
.chat-group-summary img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; }
.chat-group-summary b { font-size: 13px; font-weight: 500; }
.chat-group-details .chat-create-footer { width: calc(100% + 40px); margin: 0 -20px; }

.chat-action-overlay { position: fixed; z-index: 240; inset: 0; display: grid; place-items: center; padding: 20px; }
.chat-action-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: rgba(35,38,43,.58); backdrop-filter: blur(4px); cursor: default; }
.chat-action-panel { position: relative; z-index: 1; width: min(100%,330px); display: flex; flex-direction: column; gap: 10px; }
.chat-action-preview { display: flex; justify-content: flex-start; }
.chat-action-panel.own .chat-action-preview { justify-content: flex-end; }
.chat-action-bubble { position: relative; max-width: 290px; min-width: 150px; padding: 10px 54px 20px 12px; border-radius: 12px 12px 12px 0; background: #fff; color: #292c32; box-shadow: 0 12px 34px rgba(0,0,0,.18); }
.chat-action-bubble.own { border-radius: 12px 12px 0; background: #ffe7d0; }
.chat-action-bubble strong { display: block; margin-bottom: 3px; color: #52a81a; font-size: 12px; line-height: 16px; }
.chat-action-bubble p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 20px; }
.chat-action-bubble time { position: absolute; right: 10px; bottom: 7px; color: #8e9197; font-size: 10px; }
.chat-action-menu { overflow: hidden; border-radius: 13px; background: #fff; box-shadow: 0 18px 44px rgba(0,0,0,.22); }
.chat-action-menu button { width: 100%; height: 46px; display: grid; grid-template-columns: 28px minmax(0,1fr); gap: 10px; align-items: center; padding: 0 15px; border: 0; border-bottom: 1px solid #f0f0f0; background: #fff; color: #292c32; text-align: left; font: inherit; cursor: pointer; }
.chat-action-menu button:last-child { border-bottom: 0; }
.chat-action-menu button:hover,
.chat-action-menu button:focus-visible { background: #f7f7f7; outline: 0; }
.chat-action-menu button > span { color: #686c73; font-size: 20px; text-align: center; }
.chat-action-menu button > b { font-size: 14px; font-weight: 500; }
.chat-action-menu button.danger { color: #d92d20; }
.chat-action-menu button.danger > span { color: #d92d20; }
.chat-action-reactions { display: flex; gap: 3px; justify-content: center; padding: 7px 9px; border-radius: 24px; background: #fff; box-shadow: 0 12px 34px rgba(0,0,0,.18); }
.chat-action-reactions button { width: 42px; height: 34px; padding: 0; border: 0; border-radius: 18px; background: transparent; font-size: 21px; cursor: pointer; transition: transform .12s ease,background .12s ease; }
.chat-action-reactions button:hover { transform: translateY(-2px) scale(1.08); background: #f4f4f4; }
.chat-empty-state { min-height: 100%; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; padding: 36px 20px; color: #8d9198; text-align: center; }
.chat-empty-state > span { width: 52px; height: 52px; display: grid; place-items: center; margin-bottom: 5px; border-radius: 50%; background: #fff3e8; font-size: 24px; }
.chat-empty-state b { color: #4a4e55; font-size: 15px; }
.chat-empty-state small { font-size: 12px; line-height: 17px; }
.chat-toast { position: fixed; z-index: 250; left: 50%; bottom: 28px; max-width: calc(100vw - 32px); padding: 10px 16px; transform: translateX(-50%); border-radius: 22px; background: rgba(23,26,31,.92); color: #fff; font-size: 13px; box-shadow: 0 8px 24px rgba(0,0,0,.2); }

@media (hover: hover) {
  .chat-message-menu-trigger { opacity: 0; transition: opacity .15s ease; }
  .chat-bubble:hover .chat-message-menu-trigger,
  .header-chat-internal-bubble:hover .chat-message-menu-trigger,
  .chat-message-menu-trigger:focus-visible,
  .chat-message-menu.open + .chat-message-menu-trigger { opacity: 1; }
}

@media (max-width: 600px) {
  .chat-modal { padding: 8px; align-items: end; }
  .chat-modal-card { width: 100%; max-height: 78vh; border-radius: 18px 18px 10px 10px; }
  #chatCreateModal { padding: 0; }
  #chatCreateModal .chat-create-card { width: 100%; height: 100%; max-height: none; border-radius: 0; }
  .chat-action-overlay { align-items: center; padding: 16px; }
  .chat-action-panel { width: min(100%,320px); }
  .chat-action-menu button { height: 44px; }
  .chat-action-reactions button { width: 39px; }
  .chat-bubble { max-width: 82%; }
  .chat-message-menu { right: 4px; }
}

@media (max-width: 620px) {
  .concept-v2 .chats-shell { height: calc(100vh - 60px); height: calc(100dvh - 60px); }
}

@media (max-width: 500px) {
  .concept-v2 .header-chat-popover { bottom: 8px; }
}

@media (min-width: 1200px) {
  .concept-v2 .topbar {
    width: 100%;
    margin-left: 0;
    display: flex;
    justify-content: space-between;
    padding: 8px 20px 8px 30px;
    border-bottom: 1px solid var(--border);
    box-shadow: none;
  }
  .concept-v2 .topbar .header-left {
    width: 38px;
    display: flex;
    flex: 0 0 38px;
  }
  .concept-v2 .topbar .searchbox {
    position: absolute;
    top: 14px;
    left: 50%;
    width: 512px;
    flex: 0 0 512px;
    transform: translateX(-50%);
  }
  .concept-v2 .topbar .user-actions {
    position: static;
    width: 148px;
    flex: 0 0 148px;
  }

  .concept-v2 .portal-layout {
    grid-template-columns: 101px minmax(0,1fr) 380px;
  }
  .concept-v2 .sidebar {
    position: fixed;
    z-index: 60;
    inset: 60px auto 0 0;
    width: 101px;
    min-height: calc(100vh - 60px);
    display: flex;
    flex-direction: column;
    gap: 0;
    align-items: center;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 20px;
    border-right: 1px solid var(--border);
    box-shadow: none;
    scrollbar-width: none;
  }
  .concept-v2 .sidebar::-webkit-scrollbar { display: none; }
  .concept-v2 .rail-brand { display: none; }
  .concept-v2 .primary-nav {
    width: 61px;
    display: flex;
    flex-direction: column;
    gap: 24px;
  }
  .concept-v2 .nav-row {
    width: 61px;
    height: 67px;
    flex: 0 0 67px;
    min-height: 67px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    justify-content: flex-start;
    padding: 0;
    border-radius: 0;
    color: #333;
    font-size: 11px;
    line-height: normal;
    font-weight: 600;
    white-space: nowrap;
  }
  .concept-v2 .nav-row:hover,
  .concept-v2 .nav-row.active { background: transparent; }
  .concept-v2 .rail-icon {
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(0,0,0,.15);
    border-radius: 50%;
    background: #fff;
  }
  .concept-v2 .nav-row.active .rail-icon {
    border-color: transparent;
    background: var(--primary-bg);
  }
  .concept-v2 .rail-icon > img { width: 24px; height: 24px; }
  .concept-v2 .rail-icon > img.v2-active-glyph {
    width: 24px;
    height: 24px;
    filter: brightness(0) saturate(100%) invert(10%) sepia(34%) saturate(3600%) hue-rotate(190deg) brightness(88%) contrast(108%);
  }
  .concept-v2 .rail-icon.nav-icon-wrap b {
    left: auto;
    right: -8px;
    top: 4px;
    width: 20px;
    height: 20px;
  }
  .concept-v2 .nav-row:hover .rail-icon,
  .concept-v2 .rail-shortcut:hover > span,
  .concept-v2 .rail-settings:hover > span { border-color: rgba(var(--brand-rgb,10,33,79),.55); }

  .concept-v2 .rail-shortcuts {
    width: 61px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
  }
  .concept-v2 .rail-shortcut,
  .concept-v2 .rail-settings {
    width: 61px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    padding: 0;
    border: 0;
    background: transparent;
    color: #333;
    text-align: center;
    cursor: pointer;
  }
  .concept-v2 .rail-shortcut > span,
  .concept-v2 .rail-settings > span {
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,.15);
    border-radius: 50%;
    background: #fff;
  }
  .concept-v2 .rail-shortcut > span > img { width: 100%; height: 100%; object-fit: cover; }
  .concept-v2 .rail-service-icon { position: relative; }
  .concept-v2 .rail-menu-icon-shell { border: 0 !important; background: transparent !important; }
  .concept-v2 .rail-menu-icon-shell .drawer-service-icon {
    position: absolute;
    left: -7px;
    top: -7px;
    flex: none;
    transform: scale(.766667);
    transform-origin: center;
    transition: none;
  }
  .concept-v2 .rail-shortcut > span.rail-service-it { border: 0; background: linear-gradient(180deg,#ffeede 0%,#fec694 115.83%); }
  .concept-v2 .rail-shortcut > span.rail-service-task { border: 0; background: linear-gradient(180deg,#eff3ff 0%,#d4d7e8 100%); }
  .concept-v2 .rail-shortcut > span.rail-service-calendar,
  .concept-v2 .rail-shortcut > span.rail-service-mtoro { border: 0; background: linear-gradient(180deg,#fef0d1 0%,#dab77a 115.83%); }
  .concept-v2 .rail-service-icon img { position: absolute; max-width: none; object-fit: cover; }
  .concept-v2 .rail-shortcut > .rail-service-it img { left: -1.53px; top: -8.43px; width: 62.867px; height: 62.867px; }
  .concept-v2 .rail-shortcut > .rail-service-task img { left: -9.97px; top: -1.53px; width: 65.167px; height: 65.167px; }
  .concept-v2 .rail-shortcut > .rail-service-calendar img { left: 0; top: 4.6px; width: 61.333px; height: 61.333px; }
  .concept-v2 .rail-shortcut > .rail-service-mtoro img { left: -3.07px; top: -11.5px; width: 54.433px; height: 81.267px; }
  .concept-v2 .rail-settings > span img { width: 24px; height: 24px; object-fit: contain; }
  .concept-v2 .rail-shortcut b,
  .concept-v2 .rail-settings b {
    font-size: 11px;
    line-height: normal;
    font-weight: 600;
  }
  .concept-v2 .rail-menu-service b {
    width: 61px;
    max-height: 39px;
    display: -webkit-box;
    overflow: hidden;
    white-space: normal;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }
  .concept-v2 .rail-account {
    width: 61px;
    flex: 1 0 174px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    justify-content: space-between;
    padding-top: 24px;
    border-top: 1px solid var(--border);
  }
  .concept-v2 .rail-account .rail-shortcut > span { width: 44px; height: 44px; flex-basis: 44px; border-color: transparent; }
  .concept-v2 .rail-account .rail-ergiz > span { position: relative; background: #f1f2f6; }
  .concept-v2 .rail-account .rail-ergiz > span img {
    position: absolute;
    left: -1.3px;
    top: -.07px;
    width: 49.848px;
    height: 49.848px;
    max-width: none;
  }
  .concept-v2 .rail-settings > span { width: 44px; height: 44px; }
  .concept-v2 .sidebar > .nav-section { display: none; }

  .concept-v2 .feed {
    grid-column: 2;
    padding: 20px 0;
  }
  .concept-v2 .feed > .feed-tabs,
  .concept-v2 .feed > .stories,
  .concept-v2 .feed > .post-list,
  .concept-v2 .feed > .channels-grid,
  .concept-v2 .feed > .events-grid {
    width: min(756px, calc(100% - 40px));
    max-width: 756px;
    margin-left: auto;
    margin-right: auto;
  }
  .concept-v2 .feed-tabs { min-height: 60px; }
  .concept-v2 .stories { height: 132px; }
  .concept-v2 .post-card.has-image { min-height: 210px; }
  .concept-v2 .post-card.no-image { min-height: 199px; }
  .concept-v2 .widgets-column { grid-column: 3; }
  .concept-v2 .widgets-page,
  .concept-v2 .chats-page,
  .concept-v2 .publication-page { grid-column: 2 / 4; }
  .concept-v2 .publication-page { width: calc(100vw - 101px); }
}

/* Sliding services panel */
.services-overlay {
  position: fixed;
  z-index: 55;
  inset: 0;
  display: block;
  padding: 0;
  border: 0;
  background: rgba(0,0,0,.68);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .22s ease, visibility .22s ease;
}
.services-drawer {
  position: fixed;
  z-index: 59;
  top: 0;
  bottom: 0;
  left: 100px;
  width: 343px;
  overflow-x: hidden;
  overflow-y: auto;
  background: #fff;
  box-shadow: 12px 0 30px rgba(0,0,0,.08);
  transform: translateX(-100%);
  visibility: hidden;
  pointer-events: none;
  transition: transform .24s ease, visibility 0s linear .24s;
  scrollbar-width: thin;
  scrollbar-color: rgba(0,0,0,.16) transparent;
}
body.services-open,
body.services-closing { overflow: hidden; }
body.services-open .services-overlay { opacity: 1; visibility: visible; pointer-events: auto; }
body.services-open .services-drawer {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}

.widgets-overlay {
  position: fixed;
  z-index: 55;
  inset: 0;
  display: block;
  padding: 0;
  border: 0;
  background: rgba(0,0,0,.35);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .22s ease, visibility .22s ease;
}
.widgets-drawer {
  position: fixed;
  z-index: 59;
  top: 0;
  bottom: 0;
  left: 100px;
  width: 343px;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 20px;
  background: #fff;
  box-shadow: 12px 0 30px rgba(0,0,0,.08);
  transform: translateX(-100%);
  visibility: hidden;
  pointer-events: none;
  transition: transform .24s ease, visibility 0s linear .24s;
  scrollbar-width: thin;
  scrollbar-color: rgba(0,0,0,.16) transparent;
}
body.widgets-open,
body.widgets-closing { overflow: hidden; }
body.widgets-open .widgets-overlay { opacity: 1; visibility: visible; pointer-events: auto; }
body.widgets-open .widgets-drawer {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}
body.widgets-open .mobile-widgets-trigger { color: var(--orange); }
body.widgets-open .mobile-widgets-trigger img { width: 16.1px; height: 16.1px; }
.widgets-drawer > h2 { margin: 0; color: rgba(0,0,0,.88); font-size: 16px; line-height: 24px; font-weight: 600; }
.widgets-drawer > p { margin: 4px 0 0; color: rgba(0,0,0,.45); font-size: 16px; line-height: 24px; }
.widgets-drawer-grid {
  width: 303px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 16px;
}
.widgets-drawer-grid .widget-manager-item { width: 303px; }
.widgets-drawer-grid .widget-manager-copy strong,
.widgets-drawer-grid .widget-manager-copy span { display: -webkit-box; overflow: hidden; white-space: normal; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.services-drawer-head {
  min-height: 140px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px 20px 24px;
  background: #fff;
}
.services-drawer-title-row { height: 38px; display: flex; gap: 16px; align-items: center; }
.services-drawer-title-row h2 { flex: 1; margin: 0; color: rgba(0,0,0,.88); font-size: 16px; line-height: 24px; font-weight: 600; white-space: nowrap; }
.nested-services-back { display: none; flex: 0 0 38px; width: 38px; height: 38px; place-items: center; padding: 0; border: 0; border-radius: 50%; background: #f1f2f6; cursor: pointer; }
.nested-services-back img { width: 20px; height: 20px; }
.nested-services-back:focus-visible { outline: 2px solid rgba(var(--brand-rgb,10,33,79),.35); outline-offset: 2px; }
.services-settings { flex: 0 0 38px; width: 38px; height: 38px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: #f1f2f6; cursor: pointer; }
.services-settings img { width: 20px; height: 20px; }
.services-settings.active { background: var(--orange); }
.services-settings.active img { filter: brightness(0) invert(1); }
.services-view-switch { flex: 0 0 78px; width: 78px; height: 38px; display: grid; grid-template-columns: repeat(2, 36px); align-items: center; padding: 3px; border-radius: 40px; background: #f1f2f6; }
.services-view-switch button { width: 36px; height: 32px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 40px; background: transparent; cursor: pointer; }
.services-view-switch button.active { background: #fff; }
.services-view-switch img { display: block; width: 20px; height: 20px; }
.services-view-switch button[data-services-view="grid"]:not(.active) img { filter: grayscale(1); }
.services-view-switch button[data-services-view="list"].active img { filter: brightness(0) saturate(100%) invert(10%) sepia(34%) saturate(3600%) hue-rotate(190deg) brightness(88%) contrast(108%); }
.services-search { width: 303px; height: 42px; display: flex; gap: 16px; align-items: center; padding: 0 16px; border-radius: 56px; background: #f1f2f6; }
.services-search { position: relative; top: 4px; }
.services-search-icon { flex: 0 0 16px; width: 16px; height: 16px; }
.services-search input { min-width: 0; flex: 1; padding: 0; border: 0; outline: 0; background: transparent; color: #333; font-size: 16px; line-height: 22px; }
.services-search input::placeholder { color: #999; }
.services-search input::-webkit-search-cancel-button { display: none; appearance: none; }
.services-search-clear { display: none; flex: 0 0 18px; width: 18px; height: 18px; place-items: center; padding: 0; border: 0; background: transparent; cursor: pointer; }
.services-search.has-value .services-search-clear { display: grid; }
.services-search-clear img { width: 18px; height: 18px; }
.services-search-clear:focus-visible { outline: 2px solid rgba(var(--brand-rgb,10,33,79),.35); outline-offset: 2px; border-radius: 50%; }
.services-drawer-content { display: flex; flex-direction: column; gap: 20px; padding: 0 20px 28px; }
.services-drawer.nested-services-mode .nested-services-back { display: grid; }
.services-drawer.nested-services-mode .services-settings,
.services-drawer.nested-services-mode .services-view-switch { display: none; }
.services-drawer.nested-services-mode .services-drawer-content { gap: 0; }
.nested-services-list { width: 303px; display: flex; flex-direction: column; gap: 4px; }
.nested-service-item { width: 303px; min-height: 46px; display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-radius: 28px; color: rgba(0,0,0,.88); font-size: 14px; line-height: 22px; font-weight: 600; outline: 0; transition: background-color .15s ease; }
.nested-service-item:hover,
.nested-service-item:focus-visible { background: #f1f2f6; }
.nested-service-item img { flex: 0 0 20px; width: 20px; height: 20px; }
.nested-service-item span { min-width: 0; flex: 1; overflow-wrap: anywhere; }
.services-group { display: flex; flex-direction: column; gap: 16px; }
.services-group h3 { margin: 0; color: rgba(0,0,0,.88); font-size: 14px; line-height: 22px; font-weight: 600; }
.drawer-services-grid { width: 303px; display: grid; grid-template-columns: repeat(3,88px); column-gap: 16px; row-gap: 20px; align-items: start; }
.drawer-service { width: 88px; min-height: 83px; display: flex; flex-direction: column; gap: 8px; align-items: center; border-radius: 12px; outline: 0; }
.drawer-service:hover .drawer-service-icon-shell { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(0,0,0,.1); }
.drawer-service:focus-visible { box-shadow: 0 0 0 2px rgba(var(--brand-rgb,10,33,79),.32); }
.drawer-service-icon-shell {
  position: relative;
  flex: 0 0 60px;
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  transition: transform .16s ease, box-shadow .16s ease;
}
.drawer-service-icon { position: relative; flex: 0 0 60px; width: 60px; height: 60px; overflow: hidden; border-radius: 20px; transition: transform .16s ease, box-shadow .16s ease; }
.drawer-service-icon.tone-orange { background: linear-gradient(180deg,#ffeede 0%,#fec694 115.83%); }
.drawer-service-icon.tone-lavender { background: linear-gradient(180deg,#eff3ff 0%,#d4d7e8 100%); }
.drawer-service-icon.tone-teal { background: linear-gradient(180deg,#e3fffc 0%,#cedddc 115.83%); }
.drawer-service-icon.tone-sand { background: linear-gradient(180deg,#fef0d1 0%,#dab77a 115.83%); }
.drawer-service-icon.tone-blue { background: linear-gradient(180deg,#eff7ff 0%,#a7c3e4 115.83%); }
.drawer-service-icon.tone-sky { background: linear-gradient(180deg,#f5fdff 0%,#c7e6ff 115.83%); }
.drawer-service-icon.tone-pink { background: linear-gradient(180deg,#fff6f6 0%,#ffbbba 115.83%); }
.drawer-service-icon.tone-green { background: linear-gradient(180deg,#faffee 0%,#c7d9a0 115.83%); }
.drawer-service-icon.tone-cyan { background: linear-gradient(180deg,#cbf7ff 0%,#8ae0f8 100%); }
.drawer-service-icon.tone-grayblue { background: linear-gradient(180deg,#f1f2f6 0%,#dce9fb 115.83%); }
.drawer-service-icon img { position: absolute; max-width: none; object-fit: cover; pointer-events: none; }
.drawer-service-name { width: 88px; color: #333; text-align: center; font-size: 12px; line-height: 15px; font-weight: 600; letter-spacing: -.24px; }
.services-empty-state { width: 303px; display: flex; flex-direction: column; align-items: center; padding: 48px 16px 0; }
.services-empty-visual { width: 200px; height: 120px; display: grid; place-items: center; }
.services-empty-icon { width: 76px; height: 76px; display: grid; place-items: center; border-radius: 50%; background: #fff1f0; }
.services-empty-icon img { width: 34px; height: 34px; }
.services-empty-state p { width: 100%; margin: 8px 0 0; color: #333; overflow: hidden; text-align: center; text-overflow: ellipsis; font-size: 16px; line-height: 19px; font-weight: 600; }

.services-drawer.settings-mode .services-drawer-head {
  min-height: 74px;
  padding-bottom: 16px;
}
.services-drawer.settings-mode .services-search { display: none; }
.services-drawer.settings-mode .services-drawer-content { gap: 16px; }
.services-settings-section { width: 303px; display: flex; flex-direction: column; }
.services-settings-section.selected-services { gap: 16px; }
.services-settings-section.all-services-settings { gap: 10px; }
.services-settings-section h3 { margin: 0; color: rgba(0,0,0,.88); font-size: 14px; line-height: 22px; font-weight: 600; }
.services-settings-list { width: 303px; display: flex; flex-direction: column; }
.services-settings-row {
  width: 303px;
  min-height: 50px;
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 9px 0 8px;
  border-bottom: 1px solid #eee;
  background: #fff;
}
.services-settings-row.selected { min-height: 52px; padding: 10px 0 9px; cursor: grab; }
.services-settings-row.selected:active { cursor: grabbing; }
.services-reorder,
.services-menu-action {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.services-reorder { cursor: grab; touch-action: none; }
.services-reorder:active { cursor: grabbing; }
.services-reorder img,
.services-menu-action img { width: 20px; height: 20px; }
.services-settings-icon {
  position: relative;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 0;
  background: transparent;
}
.services-settings-icon > img { width: 100%; height: 100%; object-fit: cover; }
.services-settings-icon .drawer-service-icon {
  position: absolute;
  left: -14px;
  top: -14px;
  flex: none;
  transform: scale(.533333);
  transform-origin: center;
  transition: none;
}
.services-settings-name {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  color: #333;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  line-height: 17px;
  font-weight: 600;
  letter-spacing: -.28px;
}
.services-settings-empty { margin: 5px 0 10px; color: #999; font-size: 13px; line-height: 20px; }
.services-settings-row.dragging { opacity: .22; }
.services-sort-ghost {
  position: fixed;
  z-index: 1200;
  top: -1000px;
  left: -1000px;
  width: 303px;
  opacity: .72;
  pointer-events: none;
  box-shadow: 0 12px 30px rgba(0,0,0,.16);
}

.services-settings-icon.tone-orange,
.rail-service-icon.tone-orange { border: 0; background: linear-gradient(180deg,#ffeede 0%,#fec694 115.83%); }
.services-settings-icon.tone-lavender,
.rail-service-icon.tone-lavender { border: 0; background: linear-gradient(180deg,#eff3ff 0%,#d4d7e8 100%); }
.services-settings-icon.tone-teal,
.rail-service-icon.tone-teal { border: 0; background: linear-gradient(180deg,#e3fffc 0%,#cedddc 115.83%); }
.services-settings-icon.tone-sand,
.rail-service-icon.tone-sand { border: 0; background: linear-gradient(180deg,#fef0d1 0%,#dab77a 115.83%); }
.services-settings-icon.tone-blue,
.rail-service-icon.tone-blue { border: 0; background: linear-gradient(180deg,#eff7ff 0%,#a7c3e4 115.83%); }
.services-settings-icon.tone-sky,
.rail-service-icon.tone-sky { border: 0; background: linear-gradient(180deg,#f5fdff 0%,#c7e6ff 115.83%); }
.services-settings-icon.tone-pink,
.rail-service-icon.tone-pink { border: 0; background: linear-gradient(180deg,#fff6f6 0%,#ffbbba 115.83%); }
.services-settings-icon.tone-green,
.rail-service-icon.tone-green { border: 0; background: linear-gradient(180deg,#faffee 0%,#c7d9a0 115.83%); }
.services-settings-icon.tone-cyan,
.rail-service-icon.tone-cyan { border: 0; background: linear-gradient(180deg,#cbf7ff 0%,#8ae0f8 100%); }
.services-settings-icon.tone-grayblue,
.rail-service-icon.tone-grayblue { border: 0; background: linear-gradient(180deg,#f1f2f6 0%,#dce9fb 115.83%); }

.ds-tasks img { left: -13px; top: -2px; width: 85px; height: 85px; }
.ds-personnel img { left: -12px; top: -2px; width: 84px; height: 84px; }
.ds-hr img { left: -4px; top: 2px; width: 78px; height: 78px; }
.ds-ergcu img { left: 6px; top: -3px; width: 80px; height: 80px; }
.ds-marketplace img { left: 7px; top: 10px; width: 65px; height: 65px; }
.ds-medicine img { left: 7px; top: 9px; width: 46px; height: 46px; }
.ds-it img { left: -2px; top: -11px; width: 82px; height: 82px; }
.ds-transport img { left: 0; top: 0; width: 60px; height: 60px; }
.ds-info img { left: .75px; top: -1.62px; width: 80.384px; height: 80.384px; }
.ds-surveys img { left: 0; top: -7px; width: 78px; height: 78px; }
.ds-ergway img { left: 0; top: 3px; width: 58px; height: 58px; }
.ds-ergjl img { left: -3px; top: -2px; width: 66px; height: 66px; }
.ds-ideas img { left: 0; top: 0; width: 60px; height: 60px; }
.ds-drp img { left: 5px; top: 5px; width: 67px; height: 67px; }
.ds-questionnaire img { left: -4px; top: 6px; width: 73px; height: 73px; }
.ds-calendar img { left: 0; top: 6px; width: 80px; height: 80px; }
.ds-otipb img { left: .5px; top: 7px; width: 60px; height: 60px; }
.ds-leadership img { left: -9px; top: 2px; width: 77px; height: 77px; }
.ds-org img { left: -9px; top: 0; width: 78px; height: 78px; }
.ds-admin img { left: 3px; top: -8px; width: 77px; height: 77px; }
.ds-repairs img { left: -40px; top: 0; width: 96px; height: 96px; }
.ds-surveys360 img { left: 3px; top: 7px; width: 55px; height: 55px; }
.ds-sales img { left: 0; top: 0; width: 60px; height: 60px; }
.ds-compliance img { left: -9px; top: 3px; width: 78px; height: 78px; }
.ds-bulletin img { left: -6px; top: 2px; width: 90px; height: 90px; }
.ds-qdata img { left: 0; top: 0; width: 86px; height: 86px; }
.ds-qdocs img { left: -5px; top: 2px; width: 86px; height: 86px; }
.ds-support img { left: -3px; top: 5px; width: 67px; height: 67px; }
.ds-career img { left: -4px; top: -17px; width: 99px; height: 99px; transform: rotate(180deg) scaleY(-1); }
.ds-situation img { left: -14px; top: 3px; width: 74px; height: 74px; }
.ds-compliance-process img { left: -10px; top: 4px; width: 80px; height: 80px; }
.ds-registry img { left: -5px; top: 3px; width: 89px; height: 89px; }
.ds-help img { left: -4px; top: -4px; width: 90px; height: 90px; }
.ds-brigades img { left: -16px; top: 0; width: 111px; height: 111px; }
.ds-resources img { left: -14px; top: 4px; width: 69px; height: 69px; }
.ds-orders-schedule img { left: 0; top: 0; width: 78px; height: 78px; }
.ds-orders-assign img { left: 0; top: 3px; width: 78px; height: 78px; }
.ds-journal img { left: 5px; top: 4px; width: 78px; height: 78px; }
.ds-queue img, .ds-access img { inset: 0; width: 60px; height: 60px; }
.ds-mtoro img { left: -4px; top: -15px; width: 71px; height: 106px; }
.ds-mes img { left: 0; top: -2px; width: 89px; height: 89px; }
.ds-dispatch img { left: 0; top: 3px; width: 75px; height: 75px; }

.services-drawer.list-view .drawer-services-grid { display: flex; flex-direction: column; gap: 4px; }
.services-drawer.list-view .drawer-service { width: 303px; min-height: 60px; flex-direction: row; gap: 12px; justify-content: flex-start; padding: 6px 8px; }
.services-drawer.list-view .drawer-service-icon-shell { flex-basis: 48px; width: 48px; height: 48px; border-radius: 16px; }
.services-drawer.list-view .drawer-service-icon-shell .drawer-service-icon {
  position: absolute;
  left: -6px;
  top: -6px;
  flex: none;
  transform: scale(.8);
  transform-origin: center;
  transition: none;
}
.services-drawer.list-view .drawer-service-name { flex: 1; width: auto; text-align: left; font-size: 14px; letter-spacing: 0; }

@media (min-width: 1200px) {
  body.services-open.concept-v2 .sidebar,
  body.services-closing.concept-v2 .sidebar,
  body.widgets-open.concept-v2 .sidebar,
  body.widgets-closing.concept-v2 .sidebar {
    inset: 0 auto 0 0;
    min-height: 100vh;
    gap: 0;
  }
  body.services-open.concept-v2 .rail-brand,
  body.services-closing.concept-v2 .rail-brand,
  body.widgets-open.concept-v2 .rail-brand,
  body.widgets-closing.concept-v2 .rail-brand {
    display: block;
    width: 38.013px;
    height: 32px;
    flex: 0 0 32px;
    margin-bottom: 28px;
    transform: translate(-1px, -6.5px);
  }
  body.services-open.concept-v2 .rail-brand img,
  body.services-closing.concept-v2 .rail-brand img,
  body.widgets-open.concept-v2 .rail-brand img,
  body.widgets-closing.concept-v2 .rail-brand img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }
  body.services-open .services-trigger .rail-icon { border-color: transparent; background: var(--primary-bg); }
  body.services-open .services-trigger .rail-icon > img { width: 20px; height: 20px; }
  body.services-open .primary-nav [data-page="home"].active .rail-icon { border-color: rgba(0,0,0,.15); background: #fff; }
  body.widgets-open .widgets-trigger .rail-icon { border-color: transparent !important; background: var(--primary-bg); }
  body.widgets-open .widgets-trigger .rail-icon > img { width: 18.381px; height: 18.381px; }
  body.widgets-open .primary-nav [data-page="home"].active .rail-icon { border-color: rgba(0,0,0,.15); background: #fff; }
}

@media (max-width: 1199px) {
  .services-drawer { z-index: 100; left: 0; width: min(343px,100vw); }
  .services-overlay { z-index: 95; }
  .widgets-drawer { z-index: 100; left: 0; width: min(343px,100vw); }
  .widgets-overlay { z-index: 95; }
}

@media (max-width: 342px) {
  .widgets-drawer { padding: 16px; }
  .widgets-drawer-grid,
  .widgets-drawer-grid .widget-manager-item { width: 100%; }
  .widgets-drawer-grid .widget-manager-item { gap: 12px; }
  .widgets-drawer-grid .widget-preview { flex-basis: 124px; width: 124px; }
  .widgets-drawer-grid .widget-preview-card { transform: scale(.317647) !important; }
}

/* Concept v2 mobile navigation from Figma node 55:18299 */
@media (max-width: 1199px) {
  .concept-v2 .sidebar {
    z-index: 110;
    inset: 0 auto 0 0;
    width: 280px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
    padding: 20px;
    overflow-x: hidden;
    overflow-y: auto;
    border: 0;
    border-right: 1px solid var(--border);
    background: #fff;
    box-shadow: none;
    scrollbar-width: none;
  }
  .concept-v2 .sidebar::-webkit-scrollbar { display: none; }
  .concept-v2 .rail-brand { display: none; }
  .concept-v2 .primary-nav {
    width: 100%;
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    gap: 16px;
  }
  .concept-v2 .nav-row {
    width: 100%;
    height: 46px;
    min-height: 46px;
    display: flex;
    flex: 0 0 46px;
    gap: 16px;
    align-items: center;
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: #333;
    font-size: 16px;
    line-height: 20px;
    font-weight: 600;
  }
  .concept-v2 .nav-row:hover,
  .concept-v2 .nav-row.active { background: transparent; }
  .concept-v2 .nav-row > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .concept-v2 .primary-nav .nav-row:nth-child(4) > span:last-child { font-size: 0; }
  .concept-v2 .primary-nav .nav-row:nth-child(4) > span:last-child::after { content: "Руководство"; font-size: 16px; }
  .concept-v2 .rail-icon {
    position: relative;
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    overflow: visible;
    border: 1px solid rgba(0,0,0,.15);
    border-radius: 50%;
    background: #fff;
  }
  .concept-v2 .rail-icon > img { width: 24px; height: 24px; object-fit: contain; }
  .concept-v2 .nav-row.active .rail-icon { border-color: transparent; background: var(--primary-bg); }
  .concept-v2 .rail-icon.nav-icon-wrap b {
    left: 30px;
    top: -7px;
    width: 20px;
    height: 20px;
    border: 0;
    font-size: 12px;
    line-height: 16px;
  }
  .concept-v2 .rail-shortcuts {
    width: 100%;
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    gap: 16px;
    padding-top: 16px;
    border-top: 1px solid #eee;
  }
  .concept-v2 .rail-shortcut,
  .concept-v2 .rail-settings {
    width: 100%;
    min-height: 46px;
    display: flex;
    flex: 0 0 auto;
    flex-direction: row;
    gap: 16px;
    align-items: center;
    justify-content: flex-start;
    padding: 0;
    border: 0;
    background: transparent;
    color: #333;
    text-align: left;
    cursor: pointer;
  }
  .concept-v2 .rail-shortcut > span,
  .concept-v2 .rail-settings > span {
    position: relative;
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,.15);
    border-radius: 50%;
    background: #fff;
  }
  .concept-v2 .rail-menu-icon-shell { border: 0 !important; background: transparent !important; }
  .concept-v2 .rail-menu-icon-shell .drawer-service-icon {
    position: absolute;
    left: -7px;
    top: -7px;
    flex: none;
    transform: scale(.766667);
    transform-origin: center;
    transition: none;
  }
  .concept-v2 .rail-shortcut b,
  .concept-v2 .rail-settings b {
    min-width: 0;
    max-width: 178px;
    overflow: visible;
    color: #333;
    text-overflow: clip;
    white-space: normal;
    font-size: 16px;
    line-height: 20px;
    font-weight: 600;
  }
  .concept-v2 .rail-account {
    position: relative;
    width: 100%;
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    gap: 16px;
    padding-top: 16px;
    border-top: 1px solid #eee;
  }
  .concept-v2 .rail-account .rail-shortcut > span,
  .concept-v2 .rail-account .rail-settings > span { flex-basis: 44px; width: 44px; height: 44px; }
  .concept-v2 .rail-account .rail-ergiz > span { border-color: transparent; background: #f1f2f6; }
  .concept-v2 .rail-account .rail-ergiz > span img { position: absolute; left: -1.3px; top: -.07px; width: 49.848px; height: 44.074px; max-width: none; object-fit: cover; }
  .concept-v2 .rail-settings > span img { width: 24px; height: 24px; object-fit: contain; }
  .concept-v2 .rail-ergiz { position: relative; margin-bottom: 17px; }
  .concept-v2 .rail-ergiz::after { content: ""; position: absolute; right: 0; bottom: -17px; left: 0; height: 1px; background: #eee; }
  .concept-v2 .sidebar > .nav-section { display: none; }
  .concept-v2 .sidebar-overlay { z-index: 105; background: rgba(0,0,0,.45); }
  .concept-v2 .mobile-nav { display: none !important; }
}

@media (max-width: 991px) {
  body.concept-v2 { padding-bottom: 0; }
}

/* Dark theme follows the production Qollab palette. */
html[data-theme="dark"] {
  color-scheme: dark;
  --surface: #26262e;
  --canvas: #1b1c24;
  --text: #eceef7;
  --muted: #9b9dae;
  --border: #3a3b48;
  --orange: #8DAFE0;
  --orange-soft: #152743;
  --shadow: 0 1px 1px rgba(0,0,0,.28);
  --dark-heading: rgba(242,244,255,.92);
  --dark-control: #343545;
  --dark-primary-border: #3E5E87;
  --dark-primary-hover: #1C3556;
  --dark-light: #6a6b7c;
}

html[data-theme="dark"] body,
html[data-theme="dark"] .portal-layout { background: var(--canvas); color: var(--text); }

html[data-theme="dark"] .topbar,
html[data-theme="dark"] .sidebar,
html[data-theme="dark"] .feed-tabs,
html[data-theme="dark"] .stories,
html[data-theme="dark"] .post-card,
html[data-theme="dark"] .channel-card,
html[data-theme="dark"] .event-card,
html[data-theme="dark"] .event-cover,
html[data-theme="dark"] .event-content,
html[data-theme="dark"] .widgets-manager,
html[data-theme="dark"] .widget-card,
html[data-theme="dark"] .widget-title,
html[data-theme="dark"] .widget-footer,
html[data-theme="dark"] .publication-page,
html[data-theme="dark"] .publication-content-header,
html[data-theme="dark"] .publication-related-card,
html[data-theme="dark"] .chats-shell,
html[data-theme="dark"] .chat-sidebar,
html[data-theme="dark"] .chat-conversation,
html[data-theme="dark"] .chat-search,
html[data-theme="dark"] .chat-contact,
html[data-theme="dark"] .chat-messages,
html[data-theme="dark"] .chat-composer,
html[data-theme="dark"] .header-chat-popover,
html[data-theme="dark"] .header-chat-popover-head,
html[data-theme="dark"] .header-chat-popover-list,
html[data-theme="dark"] .header-chat-popover-item,
html[data-theme="dark"] .header-chat-popover-contact,
html[data-theme="dark"] .header-chat-conversation-view,
html[data-theme="dark"] .header-chat-conversation-head,
html[data-theme="dark"] .header-chat-conversation-messages,
html[data-theme="dark"] .header-chat-conversation-composer,
html[data-theme="dark"] .chat-selection-actions,
html[data-theme="dark"] .chat-modal-card,
html[data-theme="dark"] .chat-create-panel,
html[data-theme="dark"] .chat-create-card,
html[data-theme="dark"] .chat-create-group-row,
html[data-theme="dark"] .chat-directory-row,
html[data-theme="dark"] .chat-create-footer,
html[data-theme="dark"] .chat-action-bubble,
html[data-theme="dark"] .chat-action-menu,
html[data-theme="dark"] .chat-action-menu button,
html[data-theme="dark"] .chat-action-reactions,
html[data-theme="dark"] .services-drawer,
html[data-theme="dark"] .services-drawer-head,
html[data-theme="dark"] .services-settings-row,
html[data-theme="dark"] .widgets-drawer,
html[data-theme="dark"] .portal-settings-popover { background: var(--surface); }

html[data-theme="dark"] .searchbox,
html[data-theme="dark"] .burger-button:hover,
html[data-theme="dark"] .feed-tab,
html[data-theme="dark"] .circle-arrow,
html[data-theme="dark"] .story-visual img,
html[data-theme="dark"] .channel-cover,
html[data-theme="dark"] .channel-avatar,
html[data-theme="dark"] .publication-back-icon,
html[data-theme="dark"] .publication-comment-form input,
html[data-theme="dark"] .publication-emoji,
html[data-theme="dark"] .chat-circle-button,
html[data-theme="dark"] .chat-search input,
html[data-theme="dark"] .chat-contact:hover,
html[data-theme="dark"] .chat-contact.active,
html[data-theme="dark"] .chat-more,
html[data-theme="dark"] .chat-back,
html[data-theme="dark"] .chat-bubble,
html[data-theme="dark"] .chat-composer input,
html[data-theme="dark"] .chat-compose-action,
html[data-theme="dark"] .header-chat-popover-action,
html[data-theme="dark"] .header-chat-popover-search,
html[data-theme="dark"] .header-chat-popover-search input,
html[data-theme="dark"] .header-chat-popover-item:hover,
html[data-theme="dark"] .header-chat-popover-item.active,
html[data-theme="dark"] .header-chat-popover-contact:hover,
html[data-theme="dark"] .header-chat-conversation-action,
html[data-theme="dark"] .header-chat-conversation-composer input,
html[data-theme="dark"] .header-chat-composer-action,
html[data-theme="dark"] .chat-selection-actions button,
html[data-theme="dark"] .chat-create-card > header > button,
html[data-theme="dark"] .chat-create-search,
html[data-theme="dark"] .chat-create-structure,
html[data-theme="dark"] .chat-create-empty-icons i,
html[data-theme="dark"] .chat-group-details > label input,
html[data-theme="dark"] .services-settings,
html[data-theme="dark"] .nested-services-back,
html[data-theme="dark"] .services-view-switch,
html[data-theme="dark"] .services-search,
html[data-theme="dark"] .services-empty-icon,
html[data-theme="dark"] .portal-theme-switch,
html[data-theme="dark"] .portal-language-switch button { background: var(--dark-control); }

html[data-theme="dark"] .feed-tab.active,
html[data-theme="dark"] .nav-row.active .rail-icon,
html[data-theme="dark"] .concept-v2 .rail-settings[aria-expanded="true"] > span,
html[data-theme="dark"] .services-settings.active,
html[data-theme="dark"] .portal-language-switch button.active,
html[data-theme="dark"] .header-chat-popover-contact.active,
html[data-theme="dark"] .header-chat-popover-contact.active:hover { background: var(--orange-soft); color: var(--orange); }

html[data-theme="dark"] .feed-tab,
html[data-theme="dark"] .portal-language-switch button,
html[data-theme="dark"] .widget-toggle,
html[data-theme="dark"] .publication-submit,
html[data-theme="dark"] .chat-selection-actions button,
html[data-theme="dark"] .chat-history-list > button,
html[data-theme="dark"] .chat-confirm-actions button { color: var(--text); }
html[data-theme="dark"] .widget-toggle { border-color: var(--dark-light); background: var(--dark-control); }
html[data-theme="dark"] .widget-toggle.add { border-color: var(--orange); background: var(--surface); color: var(--orange); }
html[data-theme="dark"] .widget-toggle.locked { border-color: transparent; background: rgba(255,255,255,.06); color: rgba(255,250,242,.32); }

html[data-theme="dark"] .portal-theme-option.active,
html[data-theme="dark"] .services-view-switch button.active { background: var(--surface); }

html[data-theme="dark"] .concept-v2 .rail-icon,
html[data-theme="dark"] .concept-v2 .rail-shortcut > span,
html[data-theme="dark"] .concept-v2 .rail-settings > span,
html[data-theme="dark"] body.services-open .primary-nav [data-page="home"].active .rail-icon,
html[data-theme="dark"] body.widgets-open .primary-nav [data-page="home"].active .rail-icon { border-color: rgba(255,255,255,.1); background: var(--surface); }

html[data-theme="dark"] .concept-v2 .rail-account .rail-ergiz > span { background: var(--dark-control); }

html[data-theme="dark"] .searchbox input,
html[data-theme="dark"] .chat-search input,
html[data-theme="dark"] .chat-composer input,
html[data-theme="dark"] .header-chat-popover-search input,
html[data-theme="dark"] .header-chat-conversation-composer input,
html[data-theme="dark"] .chat-create-search input,
html[data-theme="dark"] .chat-group-details > label input,
html[data-theme="dark"] .services-search input,
html[data-theme="dark"] .publication-comment-form input { color: var(--text); caret-color: var(--orange); }

html[data-theme="dark"] input::placeholder { color: var(--muted); }

html[data-theme="dark"] .channel-copy strong,
html[data-theme="dark"] .event-title,
html[data-theme="dark"] .post-meta b,
html[data-theme="dark"] .post-title,
html[data-theme="dark"] .widgets-manager-head h1,
html[data-theme="dark"] .widget-manager-group h3,
html[data-theme="dark"] .widget-manager-copy strong,
html[data-theme="dark"] .publication-breadcrumbs,
html[data-theme="dark"] .publication-back,
html[data-theme="dark"] .publication-heading h1,
html[data-theme="dark"] .publication-meta strong,
html[data-theme="dark"] .publication-body,
html[data-theme="dark"] .publication-current-user strong,
html[data-theme="dark"] .publication-comment-head strong,
html[data-theme="dark"] .publication-comment-copy p,
html[data-theme="dark"] .publication-related-copy h3,
html[data-theme="dark"] .chat-contact-title-row strong,
html[data-theme="dark"] .chat-head-copy strong,
html[data-theme="dark"] .header-chat-popover-head h2,
html[data-theme="dark"] .header-chat-popover-title strong,
html[data-theme="dark"] .header-chat-conversation-copy strong,
html[data-theme="dark"] .chat-create-group-row,
html[data-theme="dark"] .chat-directory-row,
html[data-theme="dark"] .chat-create-empty b,
html[data-theme="dark"] .chat-group-summary > b,
html[data-theme="dark"] .chat-action-bubble,
html[data-theme="dark"] .chat-action-menu button,
html[data-theme="dark"] .widget-title h2,
html[data-theme="dark"] .mail-heading b,
html[data-theme="dark"] .mail-row > span,
html[data-theme="dark"] .task-row b,
html[data-theme="dark"] .meeting-row span,
html[data-theme="dark"] .useful-item b,
html[data-theme="dark"] .promo-content > b,
html[data-theme="dark"] .safety-stats b,
html[data-theme="dark"] .services-drawer-title-row h2,
html[data-theme="dark"] .widgets-drawer > h2,
html[data-theme="dark"] .services-group h3,
html[data-theme="dark"] .services-settings-section h3,
html[data-theme="dark"] .drawer-service-name,
html[data-theme="dark"] .nested-service-item,
html[data-theme="dark"] .services-empty-state p,
html[data-theme="dark"] .portal-settings-popover h2,
html[data-theme="dark"] .portal-settings-row > strong,
html[data-theme="dark"] .portal-language-group > strong,
html[data-theme="dark"] .concept-v2 .nav-row,
html[data-theme="dark"] .concept-v2 .rail-shortcut,
html[data-theme="dark"] .concept-v2 .rail-settings,
html[data-theme="dark"] .concept-v2 .rail-shortcut b,
html[data-theme="dark"] .concept-v2 .rail-settings b { color: var(--dark-heading); }

html[data-theme="dark"] .channel-copy span,
html[data-theme="dark"] .event-date,
html[data-theme="dark"] .event-organizer-count,
html[data-theme="dark"] .post-meta,
html[data-theme="dark"] .post-description,
html[data-theme="dark"] .post-stats,
html[data-theme="dark"] .widgets-manager-head p,
html[data-theme="dark"] .widget-manager-copy span,
html[data-theme="dark"] .publication-breadcrumbs a,
html[data-theme="dark"] .publication-breadcrumbs > span:nth-child(2),
html[data-theme="dark"] .publication-meta,
html[data-theme="dark"] .publication-body blockquote,
html[data-theme="dark"] .publication-current-user span,
html[data-theme="dark"] .publication-comment-head time,
html[data-theme="dark"] .publication-comment-actions,
html[data-theme="dark"] .publication-related-copy p,
html[data-theme="dark"] .publication-related-stats,
html[data-theme="dark"] .chat-contact-preview span,
html[data-theme="dark"] .chat-contact-preview time,
html[data-theme="dark"] .chat-placeholder,
html[data-theme="dark"] .chat-placeholder p,
html[data-theme="dark"] .chat-head-copy span,
html[data-theme="dark"] .chat-day,
html[data-theme="dark"] .chat-message-time,
html[data-theme="dark"] .header-chat-popover-message,
html[data-theme="dark"] .header-chat-popover-preview time,
html[data-theme="dark"] .header-chat-conversation-copy span,
html[data-theme="dark"] .header-chat-internal-day,
html[data-theme="dark"] .chat-history-list small,
html[data-theme="dark"] .chat-history-list i,
html[data-theme="dark"] .chat-create-empty,
html[data-theme="dark"] .chat-create-empty small,
html[data-theme="dark"] .widget-count,
html[data-theme="dark"] .mail-heading time,
html[data-theme="dark"] .mail-row > small,
html[data-theme="dark"] .task-row span,
html[data-theme="dark"] .task-row > strong,
html[data-theme="dark"] .meeting-row time,
html[data-theme="dark"] .meeting-row.past span,
html[data-theme="dark"] .useful-item span,
html[data-theme="dark"] .safety-caption,
html[data-theme="dark"] .safety-total span,
html[data-theme="dark"] .safety-stats small,
html[data-theme="dark"] .mission-card p,
html[data-theme="dark"] .widgets-drawer > p,
html[data-theme="dark"] .services-settings-empty { color: var(--muted); }

html[data-theme="dark"] .post-card,
html[data-theme="dark"] .channel-card,
html[data-theme="dark"] .event-card,
html[data-theme="dark"] .widget-card,
html[data-theme="dark"] .publication-related-card,
html[data-theme="dark"] .chat-head-avatar,
html[data-theme="dark"] .chat-contact-avatar > img,
html[data-theme="dark"] .header-chat-popover-avatar,
html[data-theme="dark"] .header-chat-conversation-avatar,
html[data-theme="dark"] .services-settings-row,
html[data-theme="dark"] .topbar,
html[data-theme="dark"] .sidebar { border-color: var(--border); }

html[data-theme="dark"] .widget-title,
html[data-theme="dark"] .mail-row,
html[data-theme="dark"] .widget-footer,
html[data-theme="dark"] .task-row,
html[data-theme="dark"] .useful-item,
html[data-theme="dark"] .safety-stats,
html[data-theme="dark"] .safety-stats > div + div,
html[data-theme="dark"] .header-chat-popover-head,
html[data-theme="dark"] .header-chat-conversation-head,
html[data-theme="dark"] .header-chat-conversation-composer,
html[data-theme="dark"] .chat-composer,
html[data-theme="dark"] .chat-create-footer,
html[data-theme="dark"] .concept-v2 .rail-shortcuts,
html[data-theme="dark"] .concept-v2 .rail-account { border-color: var(--border); }

html[data-theme="dark"] .audit-person span { background: rgba(255,255,255,.08); color: rgba(255,250,242,.68); }
html[data-theme="dark"] .chat-bubble.mine,
html[data-theme="dark"] .header-chat-internal-bubble.mine { background: var(--dark-primary-hover); color: var(--text); }
html[data-theme="dark"] .header-chat-internal-bubble,
html[data-theme="dark"] .header-chat-internal-quote { background: var(--dark-control); color: var(--text); }
html[data-theme="dark"] .chat-compose-context { background: #33291f; border-color: var(--dark-primary-border); }
html[data-theme="dark"] .chat-attachment-menu,
html[data-theme="dark"] .chat-message-menu { background: var(--surface); border-color: var(--border); box-shadow: 0 12px 32px rgba(0,0,0,.5); }
html[data-theme="dark"] .chat-attachment-menu button,
html[data-theme="dark"] .chat-message-menu button { color: var(--text); }
html[data-theme="dark"] .chat-attachment-menu button:hover,
html[data-theme="dark"] .chat-message-menu button:hover { background: var(--dark-control); }
html[data-theme="dark"] .chat-reaction-chip { border-color: var(--dark-primary-border); background: var(--surface); }
html[data-theme="dark"] .chat-ergiz-prompts button { border-color: var(--dark-primary-border); background: var(--orange-soft); color: #f4a55d; }
html[data-theme="dark"] .chat-modal-backdrop { background: rgba(0,0,0,.66); }

html[data-theme="dark"] .services-drawer,
html[data-theme="dark"] .widgets-drawer,
html[data-theme="dark"] .portal-settings-popover,
html[data-theme="dark"] .header-chat-popover { box-shadow: 0 12px 20px -4px rgba(0,0,0,.5); }

html[data-theme="dark"] .searchbox > img,
html[data-theme="dark"] .notification > img,
html[data-theme="dark"] .profile-chevron,
html[data-theme="dark"] .concept-v2 .nav-row:not(.active) .rail-icon > img,
html[data-theme="dark"] .circle-arrow img,
html[data-theme="dark"] .feed-tab:not(.active) img,
html[data-theme="dark"] .services-settings > img,
html[data-theme="dark"] .services-view-switch button:not(.active) img,
html[data-theme="dark"] .services-search-icon,
html[data-theme="dark"] .services-search-clear img,
html[data-theme="dark"] .widget-title > img,
html[data-theme="dark"] .publication-back-icon img,
html[data-theme="dark"] .chat-circle-button img,
html[data-theme="dark"] .chat-compose-action img,
html[data-theme="dark"] .header-chat-popover-action img,
html[data-theme="dark"] .header-chat-conversation-action img,
html[data-theme="dark"] .header-chat-composer-action img { filter: brightness(0) invert(.72); }

html[data-theme="dark"] .notification span,
html[data-theme="dark"] .rail-icon.nav-icon-wrap b { color: #fff; }

html[data-theme="dark"] .header-chat-popover-online { border-color: var(--surface); }
html[data-theme="dark"] body.header-chat-open .header-chat { background: var(--dark-control); }

html[data-theme="dark"] .portal-settings-divider,
html[data-theme="dark"] .concept-v2 .rail-ergiz::after { background: var(--border); }

/* Dark-theme refinements matched to the production Qollab interface. */
html[data-theme="dark"] .concept-v2 .primary-nav .nav-row {
  color: var(--text);
}

html[data-theme="dark"] .concept-v2 .primary-nav .nav-row .rail-icon {
  border-color: rgba(255,255,255,.1);
  background: transparent;
}

html[data-theme="dark"] .concept-v2 .primary-nav .nav-row:not(.active) .rail-icon > img {
  filter: brightness(0) invert(.94) sepia(.06) saturate(.18);
}

html[data-theme="dark"] .concept-v2 .primary-nav .nav-row.active {
  color: var(--orange);
}

html[data-theme="dark"] .concept-v2 .primary-nav .nav-row.active .rail-icon {
  border-color: transparent;
  background: rgba(255,255,255,.13);
}

html[data-theme="dark"] .concept-v2 .primary-nav .nav-row.active .rail-icon > img,
html[data-theme="dark"] body.services-open .concept-v2 .services-trigger .rail-icon > img,
html[data-theme="dark"] body.widgets-open .concept-v2 .widgets-trigger .rail-icon > img {
  filter: brightness(0) saturate(100%) invert(62%) sepia(20%) saturate(850%) hue-rotate(180deg) brightness(92%) contrast(87%) ;
}

html[data-theme="dark"] body.services-open .concept-v2 .services-trigger,
html[data-theme="dark"] body.widgets-open .concept-v2 .widgets-trigger {
  color: var(--orange);
}

html[data-theme="dark"] body.services-open .concept-v2 .services-trigger .rail-icon,
html[data-theme="dark"] body.widgets-open .concept-v2 .widgets-trigger .rail-icon {
  border-color: transparent;
  background: rgba(255,255,255,.13);
}

html[data-theme="dark"] body.services-open .concept-v2 .primary-nav [data-page="home"].active,
html[data-theme="dark"] body.widgets-open .concept-v2 .primary-nav [data-page="home"].active {
  color: var(--text);
}

html[data-theme="dark"] body.services-open .concept-v2 .primary-nav [data-page="home"].active .rail-icon,
html[data-theme="dark"] body.widgets-open .concept-v2 .primary-nav [data-page="home"].active .rail-icon {
  border-color: rgba(255,255,255,.1);
  background: transparent;
}

html[data-theme="dark"] body.services-open .concept-v2 .primary-nav [data-page="home"].active .rail-icon > img,
html[data-theme="dark"] body.widgets-open .concept-v2 .primary-nav [data-page="home"].active .rail-icon > img {
  filter: brightness(0) invert(.94) sepia(.06) saturate(.18);
}

/* Chats: production dark palette for lists, messages and composers. */
html[data-theme="dark"] .chat-contact:hover { background: var(--dark-control); }
html[data-theme="dark"] .chat-contact.active { background: var(--orange-soft); }
html[data-theme="dark"] .chat-sidebar-head h1 { color: var(--text); }
html[data-theme="dark"] .chat-online { border-color: var(--surface); }

html[data-theme="dark"] .chat-placeholder-art > span {
  border-color: var(--surface);
}

html[data-theme="dark"] .chat-placeholder-art .side {
  background: var(--dark-control);
}

html[data-theme="dark"] .chat-placeholder-art .center {
  background: var(--orange-soft);
  box-shadow: 0 8px 4px rgba(0,0,0,.24);
}

html[data-theme="dark"] .chat-bubble,
html[data-theme="dark"] .header-chat-internal-bubble {
  border: 1px solid var(--border);
  background: var(--dark-control);
  color: var(--text);
}

html[data-theme="dark"] .chat-message.own .chat-bubble,
html[data-theme="dark"] .header-chat-internal-row.own .header-chat-internal-bubble {
  border-color: transparent;
  background: var(--dark-primary-hover);
  color: var(--text);
}

html[data-theme="dark"] .chat-message-time,
html[data-theme="dark"] .header-chat-internal-bubble time {
  color: rgba(255,250,242,.45);
}

html[data-theme="dark"] .chat-reply,
html[data-theme="dark"] .header-chat-internal-quote {
  background: var(--surface);
  color: var(--muted);
}

html[data-theme="dark"] .chat-day::before,
html[data-theme="dark"] .chat-day::after,
html[data-theme="dark"] .header-chat-internal-day::before,
html[data-theme="dark"] .header-chat-internal-day::after {
  background: var(--border);
}

html[data-theme="dark"] .chat-search input,
html[data-theme="dark"] .header-chat-popover-search input {
  background: var(--dark-control);
  color: var(--text);
}

html[data-theme="dark"] .chat-composer input,
html[data-theme="dark"] .header-chat-conversation-composer input,
html[data-theme="dark"] .chat-compose-action,
html[data-theme="dark"] .header-chat-composer-action {
  background: rgba(43,42,39,.8);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.1);
  color: var(--text);
}

/* The source artwork has a white matte; multiply keeps the mark and rings without it. */
html[data-theme="dark"] .mission-art {
  mix-blend-mode: multiply;
  filter: brightness(1.55) contrast(1.08) saturate(.9);
}

html[data-theme="dark"] .services-settings-name { color: var(--text); }
html[data-theme="dark"] .services-reorder img {
  filter: brightness(0) invert(.63) sepia(.08) saturate(.32);
}

html[data-theme="dark"] .carousel-control button img {
  filter: brightness(0) invert(.63) sepia(.08) saturate(.32);
}

html[data-theme="dark"] .publication-comments,
html[data-theme="dark"] .publication-related { border-color: var(--border); }

html[data-theme="dark"] .publication-comments > h2,
html[data-theme="dark"] .publication-related > h2,
html[data-theme="dark"] .publication-body h2,
html[data-theme="dark"] .publication-body h3 { color: var(--text); }

html[data-theme="dark"] .publication-submit {
  border-color: var(--dark-light);
  background: var(--surface);
  color: var(--text);
}

html[data-theme="dark"] .publication-submit:hover {
  border-color: var(--orange);
  background: var(--surface);
  color: var(--orange);
}

html[data-theme="dark"] .nested-service-item:hover,
html[data-theme="dark"] .nested-service-item:focus-visible {
  background: rgba(255,255,255,.13);
  color: var(--text);
}

html[data-theme="dark"] .drawer-service:hover .drawer-service-name,
html[data-theme="dark"] .drawer-service:focus-visible .drawer-service-name {
  color: var(--text);
}

/* Dark-theme interaction and icon contrast fixes. */
html[data-theme="dark"] .mission-art {
  opacity: .72;
}

html[data-theme="dark"] .mission-card::after {
  content: "";
  position: absolute;
  z-index: 1;
  top: 74px;
  left: 50%;
  width: 78px;
  height: 78px;
  background: url("assets/mission.png") center / contain no-repeat;
  pointer-events: none;
  transform: translateX(-50%);
}

html[data-theme="dark"] .mission-card .widget-title,
html[data-theme="dark"] .mission-card p {
  z-index: 2;
}

html[data-theme="dark"] body.concept-v2.services-open .services-trigger,
html[data-theme="dark"] body.concept-v2.widgets-open .widgets-trigger {
  color: var(--orange);
}

html[data-theme="dark"] body.concept-v2.services-open .services-trigger .rail-icon,
html[data-theme="dark"] body.concept-v2.widgets-open .widgets-trigger .rail-icon {
  border-color: transparent;
  background: rgba(255,255,255,.13);
}

html[data-theme="dark"] body.concept-v2.services-open .services-trigger .rail-icon > img,
html[data-theme="dark"] body.concept-v2.widgets-open .widgets-trigger .rail-icon > img {
  filter: brightness(0) saturate(100%) invert(62%) sepia(20%) saturate(850%) hue-rotate(180deg) brightness(92%) contrast(87%) !important;
}

html[data-theme="dark"] body.concept-v2.services-open .primary-nav [data-page="home"].active,
html[data-theme="dark"] body.concept-v2.widgets-open .primary-nav [data-page="home"].active {
  color: var(--text);
}

html[data-theme="dark"] body.concept-v2.services-open .primary-nav [data-page="home"].active .rail-icon,
html[data-theme="dark"] body.concept-v2.widgets-open .primary-nav [data-page="home"].active .rail-icon {
  border-color: rgba(255,255,255,.1);
  background: transparent;
}

html[data-theme="dark"] body.concept-v2.services-open .primary-nav [data-page="home"].active .rail-icon > img,
html[data-theme="dark"] body.concept-v2.widgets-open .primary-nav [data-page="home"].active .rail-icon > img {
  filter: brightness(0) invert(.94) sepia(.06) saturate(.18);
}

html[data-theme="dark"] .concept-v2 .rail-settings {
  color: var(--text);
}

html[data-theme="dark"] .concept-v2 .rail-settings > span {
  border-color: rgba(255,255,255,.1);
  background: transparent;
}

html[data-theme="dark"] .concept-v2 .rail-settings > span img {
  filter: brightness(0) invert(.94) sepia(.06) saturate(.18);
}

html[data-theme="dark"] .concept-v2 .rail-settings[aria-expanded="true"] {
  color: var(--orange);
}

html[data-theme="dark"] .concept-v2 .rail-settings[aria-expanded="true"] b {
  color: var(--orange);
}

html[data-theme="dark"] .concept-v2 .rail-settings[aria-expanded="true"] > span {
  border-color: transparent;
  background: rgba(255,255,255,.13);
}

html[data-theme="dark"] .concept-v2 .rail-settings[aria-expanded="true"] > span img {
  content: url("assets/services-drawer/settings.svg");
  filter: brightness(0) saturate(100%) invert(62%) sepia(20%) saturate(850%) hue-rotate(180deg) brightness(92%) contrast(87%) ;
}

html[data-theme="dark"] .nested-services-back img {
  filter: brightness(0) invert(.72);
}

html[data-theme="dark"] .services-settings.active img {
  filter: brightness(0) saturate(100%) invert(62%) sepia(20%) saturate(850%) hue-rotate(180deg) brightness(92%) contrast(87%) ;
}

html[data-theme="dark"] .topbar .notification {
  border-color: var(--dark-light);
}

html[data-theme="dark"] .post-more-button {
  border-color: var(--dark-light);
  background: var(--surface);
  color: var(--muted);
}

html[data-theme="dark"] .post-more-button:hover {
  border-color: #8a857a;
  background: var(--surface);
  color: var(--text);
}

html[data-theme="dark"] .post-more-button[aria-expanded="true"],
html[data-theme="dark"] .post-more-button[aria-expanded="true"]:hover {
  border-color: #8a857a;
  background: var(--dark-control);
  color: var(--text);
}

html[data-theme="dark"] .post-more-menu {
  background: var(--surface);
  box-shadow: 0 8px 20px rgba(0,0,0,.42), 0 3px 6px rgba(0,0,0,.3);
}

html[data-theme="dark"] .post-menu-item { color: var(--text); }
html[data-theme="dark"] .post-menu-item:hover,
html[data-theme="dark"] .post-menu-item:focus-visible { background: rgba(255,255,255,.07); }
html[data-theme="dark"] .post-menu-item.danger { color: #ff7875; }
html[data-theme="dark"] .post-menu-divider { border-color: rgba(255,255,255,.08); }
html[data-theme="dark"] .post-menu-icon img { filter: brightness(0) invert(.94) sepia(.06) saturate(.18); }
html[data-theme="dark"] .post-menu-item.danger .post-menu-icon img { filter: none; }
html[data-theme="dark"] .post-menu-icon.pin-off::after { background: var(--text); box-shadow: 0 0 0 1px var(--surface); }
html[data-theme="dark"] .post-pin-mark { filter: brightness(0) invert(.68); }

/* Integra brand tokens, matched to the reference portal. */
:root { --primary: #0A214F; --primary-bg: #EAF0F8; --primary-hover: #D8E3F2; --primary-border: #A8BDD9; }
html[data-theme="dark"] { --primary: #8DAFE0; --primary-bg: #152743; --primary-hover: #1C3556; --primary-border: #3E5E87; }
/* Keep Integra accents readable on dark surfaces. */
html[data-theme="dark"] .brand img,
html[data-theme="dark"] .feed-tab.active img {
  filter: brightness(0) saturate(100%) invert(62%) sepia(20%) saturate(850%) hue-rotate(180deg) brightness(92%) contrast(87%);
}
html[data-theme="dark"] .portal-theme-option.active::before { background: var(--orange); }

/* Integra full wordmark preserves its original proportions. */
.brand { flex: 0 0 116px; width: 116px; height: 40px; }
.brand img { width: 116px; height: 40px; object-fit: contain; }
.rail-brand { width: 76px; }
.rail-brand img { width: 76px; height: auto; object-fit: contain; }
html[data-theme="dark"] .brand img,
html[data-theme="dark"] .rail-brand img { filter: brightness(0) invert(1); }
/* Compact mobile wordmark leaves room for search and account controls. */
@media (max-width: 991px) {
  .topbar { column-gap: 8px; padding-left: 12px; padding-right: 12px; }
  .header-left { gap: 8px; min-width: 0; }
  .brand { flex: 0 0 64px; width: 64px; height: 28px; }
  .brand img { width: 64px; height: 28px; object-fit: contain; }
  .user-actions { gap: 8px; }
}

/* Integra mission and brand values, matching the company home widget. */
.mission-card { height: auto; padding-bottom: 0; overflow: hidden; }
html[data-theme="dark"] .mission-card::after { content: none; }
.integra-mission { position: relative; isolation: isolate; display: flex; flex-direction: column; min-height: 290px; background: radial-gradient(62% 65% at 50% 0,rgba(255,255,255,.8),rgba(213,232,255,.24) 45%,transparent 80%),linear-gradient(rgba(184,211,247,.65),rgba(212,229,253,.45) 30%,rgba(233,242,254,.2) 58%,transparent 88%); }
.integra-mission-hero { position: relative; display: flex; justify-content: center; align-items: center; height: 140px; flex: 0 0 140px; }
.integra-mission-hero > img { position: relative; z-index: 1; width: 130px; height: auto; }
.integra-mission-particles { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.integra-mission-particles i { position: absolute; width: 2px; height: 2px; border-radius: 50%; background: #5280bd; animation: integra-sparkle 9s ease-in-out infinite; }
.integra-mission-particles i:nth-child(3n) { background: white; width: 3px; height: 3px; }
.integra-mission-content { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 150px; padding: 0 12px 18px; color: #4d5665; }
.mission-card .integra-mission-statement { position: static; margin: 0; color: var(--primary); font-size: 19px; font-weight: 600; line-height: 1.3; text-align: center; }
.integra-mission-values { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 15px 0 0; font-size: 11px; line-height: 17px; }
.integra-mission-values li { display: flex; align-items: center; gap: 6px; }
.integra-mission-values li + li::before { content: ""; width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .5; }
html[data-theme="dark"] .integra-mission { background: radial-gradient(ellipse at top,rgba(73,121,183,.28),transparent 78%); }
html[data-theme="dark"] .integra-mission-hero > img { filter: brightness(0) invert(1); }
html[data-theme="dark"] .mission-card .integra-mission-statement { color: #c7dcfa; }
html[data-theme="dark"] .integra-mission-content { color: #aab8cb; }
@keyframes integra-sparkle { 0%,100% { opacity: .2; transform: translateY(4px); } 50% { opacity: .85; transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) { .integra-mission-particles i { animation: none; opacity: .45; } }

/* Profile dropdown — Figma 104:5253. */
.profile-dropdown { position:fixed; z-index:150; width:267px; max-width:calc(100vw - 24px); display:flex; flex-direction:column; padding:4px; border-radius:8px; background:#fff; box-shadow:0 6px 8px rgba(0,0,0,.08),0 3px 3px rgba(0,0,0,.12),0 9px 14px rgba(0,0,0,.05); overflow:auto; }
.profile-dropdown-item { display:flex; align-items:center; flex:0 0 32px; width:100%; height:32px; padding:5px 12px; border:0; border-radius:4px; background:transparent; color:rgba(0,0,0,.88); text-align:left; font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif; font-size:14px; font-weight:400; line-height:22px; white-space:nowrap; cursor:default; }
.profile-dropdown-item:hover,.profile-dropdown-item:focus-visible { background:rgba(0,0,0,.04); outline:none; }
.profile-dropdown-divider { height:8px; flex:0 0 8px; }
.profile-dropdown-divider img { display:block; }
.profile-dropdown-logout { color:#ff4d4f; cursor:pointer; }
.profile-dropdown-logout:hover,.profile-dropdown-logout:focus-visible { background:#fff1f0; }
.profile[aria-expanded="true"] .profile-chevron { transform:rotate(180deg); }
html[data-theme="dark"] .profile-dropdown { background:var(--surface); }
html[data-theme="dark"] .profile-dropdown-item:not(.profile-dropdown-logout) { color:var(--text); }
html[data-theme="dark"] .profile-dropdown-item:hover,html[data-theme="dark"] .profile-dropdown-item:focus-visible { background:rgba(255,255,255,.08); }
html[data-theme="dark"] .profile-dropdown-divider img { opacity:.18; }

/* ERG and BTS share the original mission widget. */
.common-mission,.mission-title-common { display:none; }
html[data-company="erg"] .mission-card,html[data-company="bts"] .mission-card { height:287px; padding-bottom:16px; }
html[data-company="erg"] .integra-mission,html[data-company="bts"] .integra-mission,
html[data-company="erg"] .mission-title-integra,html[data-company="bts"] .mission-title-integra { display:none; }
html[data-company="erg"] .common-mission,html[data-company="bts"] .common-mission { display:contents; }
html[data-company="erg"] .mission-title-common,html[data-company="bts"] .mission-title-common { display:inline; }
.common-mission .mission-art { left:50%; transform:translateX(-50%); }
.common-mission-dark-art { display:none; }
html[data-theme="dark"] .common-mission .mission-art { visibility:hidden; }
html[data-theme="dark"] .common-mission-dark-art { display:block; position:absolute; top:74px; left:50%; transform:translateX(-50%); width:78px; height:78px; object-fit:contain; }

/* Restore the compact Qollab mark from the publications-v2 shell. */
html[data-company="erg"] .brand,html[data-company="bts"] .brand { flex:0 0 38.0134px; width:38.0134px; height:32px; }
html[data-company="erg"] .brand img,html[data-company="bts"] .brand img { width:38.0134px; height:32px; object-fit:contain; }
html[data-company="erg"] .rail-brand,html[data-company="bts"] .rail-brand { width:38.0134px; }
html[data-company="erg"] .rail-brand img,html[data-company="bts"] .rail-brand img { width:38.0134px; height:32px; object-fit:contain; }

/* BTS dark theme: active navigation and feed tabs use the green brand accent. */
html[data-company="bts"][data-theme="dark"] .concept-v2 .primary-nav .nav-row.active .rail-icon > img,
html[data-company="bts"][data-theme="dark"] body.services-open .services-trigger .rail-icon > img,
html[data-company="bts"][data-theme="dark"] body.widgets-open .widgets-trigger .rail-icon > img,
html[data-company="bts"][data-theme="dark"] .feed-tab.active img,
html[data-company="bts"][data-theme="dark"] .mobile-nav a.active img {
  filter: brightness(0) saturate(100%) invert(69%) sepia(30%) saturate(688%) hue-rotate(110deg) brightness(91%) contrast(89%) !important;
}
html[data-company="bts"][data-theme="dark"] .feed-tab.active,
html[data-company="bts"][data-theme="dark"] .primary-nav .nav-row.active,
html[data-company="bts"][data-theme="dark"] body.services-open .services-trigger,
html[data-company="bts"][data-theme="dark"] body.widgets-open .widgets-trigger {
  color:var(--primary);
}
