.header-credits {
  align-items: center;
  background:
    radial-gradient(circle at 100% 0%, rgba(56,189,248,0.22), transparent 32%),
    linear-gradient(135deg, #eff6ff, #ffffff);
  border: 1px solid #93c5fd;
  border-radius: 999px;
  box-shadow: 0 10px 22px rgba(29,78,216,0.14);
  color: #071832;
  display: inline-flex;
  flex: 0 0 auto;
  gap: 8px;
  font-size: 13px;
  font-weight: 900;
  min-height: 36px;
  padding: 5px 11px 5px 7px;
  white-space: nowrap;
}

.credit-gem-mini {
  align-items: center;
  background: #dbeafe;
  border: 1px solid #93c5fd;
  border-radius: 999px;
  color: #1d4ed8;
  display: inline-flex;
  height: 24px;
  justify-content: center;
  width: 24px;
}

.credit-gem-mini svg {
  display: block;
  fill: rgba(29,78,216,0.12);
  height: 15px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  transform-box: fill-box;
  transform-origin: center;
  width: 15px;
}

.nav-account-group {
  align-items: center;
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
}

.nav-account-group [data-auth-link],
.nav-account-group .ghost-btn {
  min-height: auto;
}

.nav-actions .nav-account-group .ghost-btn {
  min-height: 38px;
  padding: 8px 14px;
}

.nav-links .nav-account-group {
  align-items: stretch;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav-links .nav-account-group a {
  text-align: center;
}

.nav-links .nav-account-group .header-credits {
  justify-content: center;
  width: 100%;
}

.notification-bell {
  position: relative;
}

.notification-trigger {
  align-items: center;
  background: white;
  border: 1px solid #d8e0e5;
  border-radius: 12px;
  color: #071832;
  cursor: pointer;
  display: inline-flex;
  height: 48px;
  justify-content: center;
  position: relative;
  transition: 0.2s ease;
  width: 48px;
}

.notification-trigger:hover {
  transform: translateY(-2px);
}

.notification-trigger svg {
  fill: none;
  height: 22px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 22px;
}

.notification-count {
  align-items: center;
  background: #2b7a68;
  border: 2px solid white;
  border-radius: 999px;
  color: white;
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  height: 20px;
  justify-content: center;
  min-width: 20px;
  padding: 0 5px;
  position: absolute;
  right: -7px;
  top: -7px;
}

.notification-menu {
  background: white;
  border: 1px solid #dfe6ea;
  border-radius: 16px;
  box-shadow: 0 24px 56px rgba(7,24,50,0.18);
  color: #071832;
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  width: min(360px, calc(100vw - 32px));
  z-index: 40;
}

.notification-bell.is-open .notification-menu {
  display: block;
}

@media (hover: hover) and (pointer: fine) {
  .notification-bell:hover .notification-menu {
    display: block;
  }
}

.notification-menu::before {
  content: "";
  height: 14px;
  left: 0;
  position: absolute;
  right: 0;
  top: -14px;
}

.notification-head {
  align-items: center;
  border-bottom: 1px solid #edf2f4;
  display: flex;
  justify-content: space-between;
  padding: 14px 16px;
}

.notification-head strong {
  font-size: 15px;
}

.notification-head span {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.notification-list {
  display: grid;
  max-height: 330px;
  overflow: auto;
  padding: 8px;
}

.notification-item {
  display: grid;
  gap: 10px;
  grid-template-columns: auto 1fr;
  padding: 12px;
}

.notification-item + .notification-item {
  border-top: 1px solid #edf2f4;
}

.notification-dot {
  background: #071832;
  border-radius: 999px;
  height: 9px;
  margin-top: 8px;
  width: 9px;
}

.notification-item.is-success .notification-dot {
  background: #2b7a68;
}

.notification-item strong {
  display: block;
  font-size: 14px;
  line-height: 1.25;
}

.notification-item p,
.notification-empty span {
  color: #475569;
  font-size: 13px;
  line-height: 1.45;
}

.notification-item time {
  color: #64748b;
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-top: 4px;
}

.notification-empty {
  display: grid;
  gap: 4px;
  padding: 18px;
}

.notification-footer {
  border-top: 1px solid #edf2f4;
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr;
  padding: 10px;
}

.notification-footer a,
.notification-more {
  align-items: center;
  border-radius: 10px;
  display: inline-flex;
  font-size: 13px;
  font-weight: 800;
  justify-content: center;
  min-height: 40px;
  text-decoration: none;
}

.notification-footer a {
  background: #071832;
  color: white;
}

.notification-more {
  background: white;
  border: 1px solid #d8e0e5;
  color: #071832;
  cursor: pointer;
}

.notification-more:disabled {
  color: #94a3b8;
  cursor: not-allowed;
}

.screen-toast {
  background: #071832;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 14px;
  bottom: 22px;
  box-shadow: 0 18px 44px rgba(7,24,50,0.26);
  color: white;
  font-size: 14px;
  font-weight: 800;
  left: 50%;
  max-width: min(92vw, 520px);
  opacity: 0;
  padding: 14px 18px;
  position: fixed;
  transform: translate(-50%, 12px);
  transition: 0.22s ease;
  z-index: 100;
}

.screen-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.screen-toast.is-error {
  background: #9f1239;
}

@media (max-width: 640px) {
  .notification-bell,
  .notification-trigger,
  .header-credits {
    width: 100%;
  }

  .nav-tools .notification-bell,
  .nav-tools .notification-trigger,
  .nav-tools .header-credits {
    width: auto;
  }

  .header-credits {
    justify-content: center;
  }

  .nav-tools .header-credits {
    justify-content: center;
  }

  .nav-tools .credit-gem-mini {
    display: none;
  }

  .nav-account-group {
    align-items: stretch;
    width: 100%;
  }

  .notification-menu {
    left: 0;
    right: auto;
    max-height: min(70vh, 520px);
    overflow: hidden;
    width: min(360px, calc(100vw - 24px));
  }

  .notification-list {
    max-height: min(46vh, 300px);
  }

  .notification-footer {
    grid-template-columns: 1fr;
  }
}
