#page-title-bar.page-title-bar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
  width: 100%;
  padding-right: 0;
}

.page-title-text {
  flex: 1 1 auto;
  min-width: 0;
}

.page-notification {
  flex: 0 0 auto;
  margin-left: auto;
  margin-right: 0;
  display: flex;
  justify-content: flex-end;
  align-self: stretch;
  align-items: center;
}

.notification-bar {
  position: relative;
}

.notification-bar-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--font-color);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.notification-bar-toggle:hover,
.notification-bar-toggle:focus {
  background: transparent;
  color: var(--primary_color);
  outline: none;
}

.notification-bar-toggle.is-open {
  background: transparent;
  color: var(--primary_color);
}

.notification-bar-count {
  position: absolute;
  top: -0.2rem;
  right: -0.15rem;
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 0.25rem;
  border-radius: 999px;
  background: #c0392b;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1.15rem;
  text-align: center;
}

.notification-bar-panel {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  width: min(22rem, calc(100vw - 2rem));
  max-height: min(24rem, calc(100vh - 8rem));
  overflow: hidden;
  border: 1px solid var(--border_color);
  border-radius: 0.75rem;
  background: #fff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
  z-index: 130;
}

.notification-bar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border_color);
  background: var(--lightest_color);
}

.notification-bar-close {
  border: 0;
  background: transparent;
  color: #64748b;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.notification-bar-body {
  max-height: min(20rem, calc(100vh - 10rem));
  overflow-y: auto;
  padding: 0.5rem 0;
}

.notification-bar-empty {
  margin: 0;
  padding: 1rem;
  text-align: center;
  color: #64748b;
  font-size: 0.9rem;
}

.notification-section + .notification-section {
  border-top: 1px solid #eef2f0;
  margin-top: 0.25rem;
  padding-top: 0.25rem;
}

.notification-section-label {
  padding: 0.5rem 1rem 0.25rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

.notification-item-row {
  display: flex;
  align-items: flex-start;
  gap: 0.25rem;
  padding-right: 0.35rem;
}

.notification-item-row .notification-item {
  flex: 1 1 auto;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: inherit;
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.notification-item:hover,
.notification-item:focus {
  background: #f8faf9;
  color: inherit;
  text-decoration: none;
}

.notification-item-icon {
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}

.notification-item-icon--todo {
  background: #e8f5ee;
  color: var(--primary_color);
}

.notification-item-icon--alert {
  background: #fdecea;
  color: #c0392b;
}

.notification-item-icon--info,
.notification-item-icon--article {
  background: #eef4ff;
  color: #2563eb;
}

.notification-item-icon--task {
  background: #fff4e5;
  color: #b45309;
}

.notification-item-content {
  flex: 1 1 auto;
  min-width: 0;
}

.notification-item-title {
  display: block;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--font-color);
}

.notification-item-message {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.82rem;
  line-height: 1.35;
  color: #64748b;
}

.notification-item-dismiss {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: #94a3b8;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.15rem;
}

.notification-item-dismiss:hover,
.notification-item-dismiss:focus {
  color: #475569;
}

@media (max-width: 600px) {
  #page-title-bar.page-title-bar {
    flex-wrap: wrap;
    align-items: center;
    position: relative;
    padding-right: 0;
  }

  .page-title-text {
    flex: 1 1 100%;
    text-align: center;
  }

  .page-notification {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    margin-left: 0;
  }

  .notification-bar-panel {
    right: 0;
  }
}
