.jacob-notification-center {
  position: relative;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-left: auto;
}

.jacob-notification-toggle {
  position: relative;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 8px;
  color: #e2e8f0;
  background: rgba(2, 6, 23, 0.74);
  cursor: pointer;
}

.jacob-notification-toggle:hover,
.jacob-notification-toggle[aria-expanded="true"] {
  border-color: rgba(56, 189, 248, 0.55);
  background: rgba(14, 165, 233, 0.15);
  box-shadow: 0 12px 32px rgba(14, 165, 233, 0.15);
}

.jacob-notification-bell-icon {
  position: relative;
  width: 17px;
  height: 16px;
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: 9px 9px 4px 4px;
}

.jacob-notification-bell-icon::before,
.jacob-notification-bell-icon::after {
  position: absolute;
  left: 50%;
  content: "";
  transform: translateX(-50%);
}

.jacob-notification-bell-icon::before {
  bottom: -5px;
  width: 22px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.jacob-notification-bell-icon::after {
  bottom: -9px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #f59e0b;
}

.jacob-notification-count {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border: 2px solid #020617;
  border-radius: 999px;
  color: #111827;
  background: #fbbf24;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 16px;
  text-align: center;
}

.jacob-notification-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  display: grid;
  width: min(430px, calc(100vw - 28px));
  max-height: min(72svh, 640px);
  grid-template-rows: auto auto auto minmax(0, 1fr) auto auto;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 8px;
  background: rgba(2, 6, 23, 0.98);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.38);
}

.jacob-notification-panel[hidden] {
  display: none !important;
}

.jacob-notification-panel-head {
  display: flex;
  gap: 12px;
  align-items: start;
  justify-content: space-between;
  padding: 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.jacob-notification-panel-head p,
.jacob-notification-detail p:first-child {
  margin: 0;
  color: #38bdf8;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.jacob-notification-panel-head h2 {
  margin: 4px 0 0;
  color: #f8fafc;
  font-size: 1.05rem;
  letter-spacing: 0;
}

.jacob-notification-close,
.jacob-notification-actions button,
.jacob-notification-filters button,
.jacob-notification-read,
#jacob-notification-open-action {
  min-height: 34px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.86);
  cursor: pointer;
}

.jacob-notification-filters,
.jacob-notification-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 10px 12px 0;
}

.jacob-notification-filters button {
  padding: 0 10px;
  color: #94a3b8;
  font-size: 0.78rem;
}

.jacob-notification-filters button.active,
.jacob-notification-filters button[aria-selected="true"] {
  border-color: rgba(45, 212, 191, 0.45);
  color: #ccfbf1;
  background: rgba(20, 184, 166, 0.14);
}

.jacob-notification-actions {
  padding-bottom: 10px;
}

.jacob-notification-actions button {
  flex: 1 1 110px;
  padding: 0 9px;
  color: #cbd5e1;
  font-size: 0.76rem;
}

.jacob-notification-list {
  display: grid;
  gap: 8px;
  min-height: 0;
  margin: 0;
  padding: 0 12px 12px;
  overflow: auto;
  list-style: none;
}

.jacob-notification-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: stretch;
  min-width: 0;
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-left: 3px solid #64748b;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.58);
}

.jacob-notification-item.unread {
  background: rgba(14, 165, 233, 0.12);
}

.jacob-notification-item.severity-success {
  border-left-color: #22c55e;
}

.jacob-notification-item.severity-warning {
  border-left-color: #f59e0b;
}

.jacob-notification-item.severity-critical {
  border-left-color: #fb7185;
}

.jacob-notification-open {
  display: grid;
  min-width: 0;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 9px;
  padding: 10px;
  border: 0;
  color: inherit;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.jacob-notification-dot {
  width: 9px;
  height: 9px;
  margin-top: 6px;
  border-radius: 50%;
  background: #64748b;
}

.jacob-notification-item.unread .jacob-notification-dot {
  background: #38bdf8;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.48);
}

.jacob-notification-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.jacob-notification-copy strong,
.jacob-notification-copy small,
.jacob-notification-copy em,
.jacob-notification-detail h3,
.jacob-notification-detail p,
.jacob-notification-detail span {
  overflow-wrap: anywhere;
}

.jacob-notification-copy strong {
  color: #f8fafc;
  font-size: 0.88rem;
}

.jacob-notification-copy small,
.jacob-notification-detail span {
  color: #94a3b8;
  font-size: 0.76rem;
}

.jacob-notification-copy em {
  color: #cbd5e1;
  font-size: 0.8rem;
  font-style: normal;
  line-height: 1.35;
}

.jacob-notification-read {
  align-self: center;
  margin-right: 8px;
  padding: 0 9px;
  color: #cbd5e1;
  font-size: 0.72rem;
}

.jacob-notification-read:disabled {
  opacity: 0.55;
  cursor: default;
}

.jacob-notification-empty {
  padding: 18px;
  border: 1px dashed rgba(148, 163, 184, 0.24);
  border-radius: 8px;
  color: #94a3b8;
  text-align: center;
}

.jacob-notification-detail {
  display: grid;
  gap: 7px;
  margin: 0 12px 12px;
  padding: 12px;
  border: 1px solid rgba(45, 212, 191, 0.22);
  border-radius: 8px;
  background: rgba(20, 184, 166, 0.08);
}

.jacob-notification-detail[hidden] {
  display: none !important;
}

.jacob-notification-detail h3 {
  margin: 0;
  color: #f8fafc;
  font-size: 0.98rem;
  letter-spacing: 0;
}

.jacob-notification-detail p {
  margin: 0;
}

#jacob-notification-open-action {
  justify-self: start;
  padding: 0 12px;
}

.jacob-notification-live {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (max-width: 780px) {
  .topbar {
    position: relative;
    padding-right: 54px;
  }

  .jacob-notification-center {
    position: absolute;
    top: 12px;
    right: 0;
    width: auto;
    justify-content: flex-start;
    margin-left: 0;
  }

  .jacob-notification-toggle {
    width: 40px;
    height: 40px;
  }

  .jacob-notification-panel {
    position: fixed;
    top: 76px;
    right: 12px;
    left: 12px;
    width: auto;
    max-height: calc(100svh - 96px);
  }

  .jacob-notification-item {
    grid-template-columns: minmax(0, 1fr);
  }

  .jacob-notification-read {
    justify-self: start;
    margin: 0 0 10px 10px;
  }
}
