.cc-notifications {
  position: relative;
  z-index: 20;
  flex: 0 0 auto;
  color: var(--navy);
}
.header-inner:has(> .cc-notifications) {
  flex-wrap: wrap;
  gap: 8px 14px;
}
.header-inner:has(> .cc-notifications) > .auth-buttons { display: none; }
.header-inner:has(> .cc-notifications) > .public-navigation { display: contents; }
.header-inner:has(> .cc-notifications) > .public-navigation > .header-link { order: 2; }
.header-inner:has(> .cc-notifications) > .public-navigation > .header-link:first-child { margin-left: auto; }
.header-inner:has(> .cc-notifications) > .cc-notifications { order: 3; margin-left: 0; }
.header-inner:has(> .cc-notifications) > .public-navigation > [data-workspace-switch] { order: 4; }
.cc-notifications-toggle {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--navy);
  cursor: pointer;
}
.cc-notifications-toggle:hover,
.cc-notifications-toggle:focus-visible {
  border-color: var(--violet);
  outline: 2px solid color-mix(in srgb, var(--violet) 24%, transparent);
  outline-offset: 2px;
}
.cc-notifications-toggle svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}
.cc-notifications-count {
  position: absolute;
  top: -6px;
  right: -7px;
  display: grid;
  place-items: center;
  min-width: 19px;
  height: 19px;
  padding: 0 4px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #b93852;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}
.cc-notifications-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(390px, calc(100vw - 32px));
  max-height: min(620px, calc(100dvh - 100px));
  overscroll-behavior: contain;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(22, 29, 57, .2);
}
.cc-notifications-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--line);
}
.cc-notifications-heading h2 { margin: 0 0 3px; font-size: 17px; }
.cc-notifications-heading span { color: var(--muted); font-size: 12px; }
.cc-notifications-refresh,
.cc-notification-mark {
  display: grid;
  flex: 0 0 36px;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--navy);
  font: inherit;
  font-size: 19px;
  cursor: pointer;
}
.cc-notifications-read-all {
  display: block;
  width: 100%;
  padding: 10px 18px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #f7f7fc;
  color: var(--violet);
  text-align: left;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.cc-notifications-older {
  display: block;
  width: 100%;
  padding: 11px 18px;
  border: 0;
  border-top: 1px solid var(--line);
  background: #fff;
  color: var(--violet);
  text-align: center;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.cc-notifications-list {
  max-height: min(500px, calc(100dvh - 190px));
  overflow-y: auto;
  overscroll-behavior: contain;
}
.cc-notification {
  display: flex;
  align-items: stretch;
  gap: 8px;
  padding: 4px 10px 4px 0;
  border-bottom: 1px solid #ececf2;
}
.cc-notification:last-child { border-bottom: 0; }
.cc-notification.is-unread { background: #f7f6fc; }
.cc-notification-open {
  display: grid;
  flex: 1 1 auto;
  min-width: 0;
  gap: 5px;
  padding: 13px 12px 13px 18px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.cc-notification-open:focus-visible,
.cc-notifications-read-all:focus-visible,
.cc-notifications-refresh:focus-visible,
.cc-notification-mark:focus-visible,
.cc-notifications-older:focus-visible { outline: 2px solid var(--violet); outline-offset: -2px; }
.cc-notification-title { font-size: 13px; font-weight: 750; }
.cc-notification-description { color: var(--muted); font-size: 12px; line-height: 1.45; }
.cc-notification-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; color: var(--muted); font-size: 10px; }
.cc-notification.is-unread .cc-notification-meta span { color: #9c3049; font-weight: 700; }
.cc-notification-mark { align-self: center; flex-basis: 32px; width: 32px; height: 32px; font-size: 15px; }
.cc-notifications-state { margin: 0; padding: 22px 18px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.cc-notifications-state[data-kind="error"] { color: #a32646; }
@media (max-width: 760px) {
  .header-inner:has(> .cc-notifications) > .mobile-nav-toggle {
    order: 2;
    margin-left: auto;
  }
  .header-inner:has(> .cc-notifications) > .cc-notifications {
    order: 3;
    margin-left: 8px;
  }
  .header-inner:has(> .cc-notifications) > .public-navigation {
    order: 4;
    display: none;
    flex: 0 0 100%;
    width: 100%;
    align-items: stretch;
    flex-direction: column;
    gap: 4px;
    padding: 12px 0 4px;
    margin-left: 0;
  }
  .header-inner:has(> .cc-notifications) > .public-navigation.is-open { display: flex; }
  .cc-notifications-panel {
    top: calc(100% + 8px);
    right: 0;
    width: min(390px, calc(100vw - 24px));
    max-height: calc(100dvh - 88px);
  }
  .cc-notifications-list { max-height: calc(100dvh - 190px); }
}
@media (prefers-reduced-motion: no-preference) {
  .cc-notifications-panel:not([hidden]) { animation: cc-notifications-enter 140ms ease-out; }
  @keyframes cc-notifications-enter { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }
}