.communications-shell {
  --ink: #172438;
  --muted: #65748c;
  --blue: #245add;
  --blue-soft: #e8effe;
  --accent: var(--blue);
  --text: var(--ink);
  --bg: #f2f5f9;
  --line: #dee6ef;
  --radius: 12px;
  --communications-sidebar-width: 218px;
  background: var(--bg);
  color: var(--ink);
}

.communications-shell .sidebar {
  width: var(--communications-sidebar-width);
  padding: 23px 12px 15px;
  background: #fff;
  color: var(--ink);
  border-right: 1px solid var(--line);
}

.communications-shell .sidebar > nav,
.communications-shell .sidebar > .workspace-mode-switch,
.communications-shell .sidebar > .communications-brand {
  flex-shrink: 0;
}

.communications-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 4px 26px;
  padding: 0 2px;
  color: var(--ink);
  text-decoration: none;
}

.communications-brand strong,
.communications-brand small {
  display: block;
  white-space: nowrap;
}

.communications-brand strong {
  font-size: 17px;
  line-height: 1.25;
  font-weight: 760;
  letter-spacing: -.5px;
}

.communications-brand small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.communications-mark {
  position: relative;
  width: 36px;
  height: 36px;
  display: block;
  flex: none;
}

.communications-mark::before,
.communications-mark::after {
  content: '';
  position: absolute;
  width: 26px;
  height: 26px;
}

.communications-mark::before {
  top: 1px;
  left: 0;
  border-radius: 14px 14px 14px 4px;
  background: #3980f1;
  transform: rotate(-10deg);
}

.communications-mark::after {
  bottom: 0;
  right: 0;
  border-radius: 14px 14px 14px 4px;
  background: #2cb294;
  opacity: .88;
  transform: rotate(10deg);
}

.communications-nav-group {
  margin-bottom: 25px;
}

.communications-nav-group .nav-caption {
  margin: 0 0 10px;
  padding: 0 11px;
  color: #61748e;
  font-size: 10px;
  line-height: 1.3;
  font-weight: 720;
  letter-spacing: .85px;
  text-transform: uppercase;
}

.communications-shell .nav-button {
  min-height: 39px;
  margin: 0 0 2px;
  padding: 8px 10px;
  gap: 10px;
  border-radius: 8px;
  color: #40526e;
  font-size: 13px;
  font-weight: 500;
}

.communications-shell .nav-button .icon {
  width: 17px;
  height: 17px;
  flex: none;
  color: #667c9b;
}

.communications-shell .nav-button:hover {
  background: #f1f5fc;
  color: #2148a4;
}

.communications-shell .nav-button.active {
  background: var(--blue-soft);
  color: #164ecb;
  font-weight: 720;
  box-shadow: none;
}

.communications-shell .nav-button.active .icon {
  color: #164ecb;
}

.communications-badge {
  margin-left: auto;
  border-radius: 5px;
  padding: 2px 5px;
  background: #fceced;
  color: #a8262b;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
}

.communications-shell .sidebar-footer {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.communications-shell .main {
  min-width: 0;
  margin-left: var(--communications-sidebar-width);
  width: calc(100% - var(--communications-sidebar-width));
}

.communications-shell .page {
  padding: 27px 27px 44px;
  max-width: 1550px;
}

.communications-shell :is(.panel, .ws-metric, .wb-stat) {
  border-color: var(--line);
  border-radius: var(--radius);
  box-shadow: 0 2px 6px #21395806;
}

.communications-shell .page-heading h1 {
  font-size: clamp(24px, 2.05vw, 29px);
  line-height: 1.2;
  letter-spacing: -.65px;
}

.communications-shell .btn.primary,
body:has(.communications-shell) #dialog .btn.primary {
  background: #265ddd;
  border-color: #265ddd;
  color: #fff;
}

.communications-shell .btn.primary:hover:not(:disabled),
body:has(.communications-shell) #dialog .btn.primary:hover:not(:disabled) {
  background: #1b4ec4;
  border-color: #1b4ec4;
}

.communications-shell .section-navigation {
  gap: 4px;
  margin-bottom: 20px;
  padding-bottom: 10px;
}

.communications-shell .section-navigation button.active,
.communications-shell .workspace-mode-switch button[aria-pressed="true"] {
  border-color: #d9e4f9;
  background: var(--blue-soft);
  color: #164ecb;
}

.communications-shell .workspace-mode-switch button:hover:not(:disabled) {
  background: var(--blue-soft);
}

.communications-shell .communications-topbar {
  height: 69px;
  padding: 0 27px;
  gap: 18px;
  background: #fff;
  border-bottom-color: var(--line);
}

.communications-tools,
.communications-account {
  display: flex;
  align-items: center;
  gap: 17px;
  min-width: 0;
}

.communications-tools {
  width: min(100%, 575px);
}

.communications-account {
  flex: none;
}

.communications-shell .communications-search {
  height: 42px;
  flex: 1;
  min-width: 0;
  justify-content: flex-start;
  gap: 10px;
  padding: 0 12px;
  border: 1px solid #e1e8f3;
  border-radius: 10px;
  background: #f4f6fa;
  color: #63758d;
  text-align: left;
  font-size: 13px;
}

.communications-shell .communications-search:hover {
  background: #eef3fb;
  border-color: #cddaf0;
}

.communications-search > .icon {
  width: 17px;
  height: 17px;
  flex: none;
}

.communications-search > span {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.communications-shell .communications-search kbd {
  margin-left: auto;
  color: #526681;
  background: transparent;
  white-space: nowrap;
  font-size: 10px;
  line-height: 1.15;
}

.communications-shell .communications-assistant {
  flex: none;
  min-height: 36px;
  padding: 8px 13px;
  border-radius: 8px;
  border-color: transparent;
  background: #265ddd;
  font-size: 12px;
  font-weight: 700;
}

.communications-assistant .icon,
.communications-role .icon,
.communications-upload .icon {
  width: 16px;
  height: 16px;
  flex: none;
}

.communications-shell .communications-upload {
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #405575;
  background: #fff;
  box-shadow: none;
}

.communications-shell .communications-upload:hover {
  background: #eef3fb;
  border-color: #cddaf0;
  color: #2148a4;
}

.communications-role {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 8px;
  min-height: 37px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #3c4d68;
  font-size: 12px;
  font-weight: 650;
}

.communications-shell .communications-profile {
  min-width: 0;
  width: auto;
  margin: 0;
  padding: 0 0 0 14px;
  border: 0;
  border-left: 1px solid var(--line);
  gap: 8px;
  color: var(--ink);
}

.communications-profile .avatar {
  background: #e8ecfa;
  color: #36539d;
  width: 34px;
  height: 34px;
  font-size: 11px;
}

.communications-profile .profile-label {
  max-width: 158px;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 700;
}

.communications-shell :is(.communications-brand, .communications-profile, .nav-button, .communications-search, .communications-assistant, .communications-upload, .section-navigation button, .workspace-mode-switch button):focus-visible {
  outline: 2px solid #316add;
  outline-offset: 2px;
}

@media (max-width: 1080px) {
  .communications-shell .communications-topbar {
    padding-inline: 20px;
  }

  .communications-shell .page {
    padding-inline: 20px;
  }

  .communications-tools,
  .communications-account {
    gap: 11px;
  }

  .communications-profile .profile-label {
    max-width: 115px;
  }
}

@media (max-width: 800px) {
  .communications-shell .sidebar {
    width: min(255px, calc(100% - 48px));
    visibility: hidden;
    transform: translateX(-100%);
    transition: transform .2s;
  }

  .communications-shell.sidebar-open .sidebar {
    visibility: visible;
    transform: translateX(0);
  }

  .communications-shell .main {
    margin-left: 0;
    width: 100%;
  }

  .communications-shell.sidebar-open .mobile-overlay {
    position: fixed;
    inset: 0;
    z-index: 25;
    display: block;
    background: #17243873;
  }

  .communications-tools .mobile-toggle {
    display: inline-grid;
    flex: none;
    margin: 0;
  }

  .communications-shell .communications-topbar {
    height: 64px;
    padding-inline: 14px;
    gap: 10px;
  }

  .communications-shell .page {
    padding: 22px 14px 34px;
  }
}

@media (max-width: 595px) {
  .communications-role,
  .communications-profile .profile-label,
  .communications-shell .communications-search kbd {
    display: none;
  }

  .communications-shell .communications-search {
    min-width: 38px;
    height: 38px;
    padding-inline: 9px;
  }

  .communications-shell .communications-search > span {
    display: block;
  }

  .communications-shell .communications-profile {
    border: 0;
    padding: 0;
  }
}

@media (max-width: 375px) {
  .communications-shell .communications-topbar {
    gap: 8px;
    padding-inline: 11px;
  }

  .communications-shell .communications-assistant {
    gap: 6px;
    padding-inline: 8px;
  }

  .communications-shell .communications-search {
    flex: none;
    width: 38px;
    justify-content: center;
  }

  .communications-shell .communications-search > span {
    display: none;
  }

  .communications-tools {
    gap: 7px;
  }

  .communications-account {
    gap: 7px;
  }
}
