.notification-bubble {
  position: fixed;
  right: 28px;
  bottom: 28px;
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, #3188db, #1769bf);
  box-shadow: 0 14px 34px rgba(19, 86, 150, .34);
  cursor: pointer;
  z-index: 190;
  transition: transform .18s, box-shadow .18s;
}
.notification-bubble:hover { box-shadow: 0 18px 40px rgba(19, 86, 150, .42); transform: translateY(-2px); }
.notification-bubble > span { font-size: 17px; font-weight: 900; }
.notification-bubble > b {
  position: absolute;
  inset: -5px -5px auto auto;
  min-width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  padding: 0 6px;
  border: 3px solid #fff;
  border-radius: 99px;
  color: #fff;
  background: var(--red);
  font-size: 8px;
}
.notification-bubble.critical { background: linear-gradient(145deg, #e86675, #be3144); animation: notificationPulse 2s ease-in-out infinite; }
.notification-bubble.warning { background: linear-gradient(145deg, #eda54d, #bd6c19); }
.notification-backdrop { position: fixed; inset: 0; background: rgba(4, 17, 31, .42); backdrop-filter: blur(2px); z-index: 200; }
.notification-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(470px, 100vw);
  display: flex;
  flex-direction: column;
  color: #23384f;
  background: #f5f8fb;
  box-shadow: -22px 0 60px rgba(7, 29, 50, .22);
  z-index: 210;
  animation: notificationDrawerIn .2s ease;
}
.notification-drawer > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 22px 18px;
  border-bottom: 1px solid #dce5ee;
  color: #fff;
  background: linear-gradient(135deg, #102e4e, #0b1f36);
}
.notification-drawer > header > div { display: flex; flex-direction: column; gap: 4px; }
.notification-drawer > header span { color: #76bcf5; font-size: 7px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.notification-drawer > header strong { font-size: 18px; }
.notification-drawer > header small { color: #abc1d5; font-size: 8px; }
.notification-drawer > header button {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, .08);
  font-size: 20px;
  cursor: pointer;
}
.notification-drawer-content { min-height: 0; overflow: auto; flex: 1; padding: 16px 16px max(24px, env(safe-area-inset-bottom)); }
.notification-toolbar { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.drawer-action {
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid #cbd9e6;
  border-radius: 9px;
  color: #34506b;
  background: #fff;
  font-size: 8px;
  font-weight: 900;
  cursor: pointer;
}
.drawer-action.primary { border-color: #2377c5; color: #fff; background: #2377c5; }
.drawer-action:disabled { color: #9aa7b4; background: #eef2f5; cursor: not-allowed; }
.notification-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 17px; }
.notification-summary article {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 12px;
  border: 1px solid #dbe4ed;
  border-top: 3px solid var(--blue);
  border-radius: 10px;
  background: #fff;
}
.notification-summary article.critical { border-top-color: var(--red); }
.notification-summary article.warning { border-top-color: var(--amber); }
.notification-summary span { color: #728398; font-size: 7px; font-weight: 800; }
.notification-summary strong { color: var(--navy); font-size: 17px; }
.notification-drawer-section { margin-top: 17px; }
.notification-drawer-section > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; padding: 0 2px; }
.notification-drawer-section > header > div { display: flex; flex-direction: column; gap: 3px; }
.notification-drawer-section > header strong { color: var(--navy); font-size: 11px; }
.notification-drawer-section > header small { color: #8190a1; font-size: 7px; }
.notification-drawer-section > header > span {
  min-width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  padding: 0 5px;
  border-radius: 99px;
  color: #fff;
  background: #6a7f95;
  font-size: 7px;
  font-weight: 900;
}
.notification-list { display: grid; gap: 8px; }
.notification-item {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
  border: 1px solid #dce5ee;
  border-left: 3px solid var(--amber);
  border-radius: 11px;
  background: #fff;
}
.notification-item.critical { border-left-color: var(--red); }
.notification-item.activity { border-left-color: #8ba0b5; }
.notification-item.unread { background: #fbfdff; box-shadow: 0 7px 20px rgba(21, 54, 84, .08); }
.notification-item-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  background: var(--amber);
  font-size: 9px;
  font-weight: 900;
}
.notification-item.critical .notification-item-icon { background: var(--red); }
.notification-item.activity .notification-item-icon { background: #6b8198; }
.notification-item > div { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.notification-item small { color: #8494a5; font-size: 7px; }
.notification-item strong { overflow: hidden; color: var(--navy); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.notification-item p { margin: 0; color: #687b8f; font-size: 8px; line-height: 1.45; }
.notification-item footer { grid-column: 2; display: flex; justify-content: flex-end; gap: 6px; }
.notification-item footer button {
  padding: 6px 8px;
  border: 1px solid #cbdbea;
  border-radius: 7px;
  color: #276aa7;
  background: #fff;
  font-size: 7px;
  font-weight: 900;
  cursor: pointer;
}
.notification-item footer button:last-child:not(:first-child) { color: #667a8e; background: #f3f6f8; }
.drawer-empty { display: flex; align-items: center; gap: 10px; padding: 13px; border: 1px solid #dce5ee; border-radius: 10px; background: #fff; }
.drawer-empty > b { width: 33px; height: 33px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 9px; color: var(--green); background: var(--green-soft); font-size: 13px; }
.drawer-empty > span { display: flex; flex-direction: column; gap: 3px; }
.drawer-empty strong { color: var(--navy); font-size: 9px; }
.drawer-empty small { color: #8292a4; font-size: 7px; }

@keyframes notificationDrawerIn { from { opacity: 0; transform: translateX(28px); } }
@keyframes notificationPulse {
  0%, 100% { box-shadow: 0 14px 34px rgba(190, 49, 68, .32); }
  50% { box-shadow: 0 14px 38px rgba(190, 49, 68, .55), 0 0 0 7px rgba(190, 49, 68, .09); }
}

@media (max-width: 900px) {
  .notification-bubble { right: 17px; bottom: 84px; width: 54px; height: 54px; }
  .notification-drawer { top: 65px; }
  .notification-drawer > header { padding: 18px 17px 15px; }
  .notification-drawer-content { padding: 13px 13px max(22px, env(safe-area-inset-bottom)); }
}

@media (max-width: 480px) {
  .notification-toolbar { grid-template-columns: 1fr; }
  .notification-drawer { width: 100vw; }
  .notification-summary article { padding: 10px; }
  .notification-item { padding: 10px; }
  .notification-item footer { grid-column: 1 / -1; }
  .notifications-open .notification-bubble { opacity: 0; pointer-events: none; }
}
