/* Notification bell - shared by index.php and dashboard.php. Uses the colour variables from styles.css. */
.logo-group { display: flex; align-items: center; gap: 14px; min-width: 0; }
.notify-root { position: relative; display: inline-flex; align-items: center; }
.notify-root[hidden] { display: none !important; }

.notify-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%; padding: 0; cursor: pointer;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--border-light, #2a2f45); color: var(--text-secondary, #b4b8cc);
  transition: color .2s, border-color .2s, background .2s;
}
.notify-btn:hover, .notify-btn[aria-expanded="true"] { color: #fff; border-color: var(--accent, #6366f1); background: rgba(99, 102, 241, 0.15); }
.notify-btn:focus-visible { outline: 2px solid var(--accent, #6366f1); outline-offset: 2px; }
.notify-btn.has-new { color: #fff; }
.notify-badge {
  position: absolute; top: -4px; inset-inline-end: -4px; min-width: 19px; height: 19px; padding: 0 5px; box-sizing: border-box;
  display: inline-flex; align-items: center; justify-content: center; border-radius: 10px;
  background: #ef4444; color: #fff; font-size: 0.7rem; font-weight: 700; line-height: 1; border: 2px solid var(--bg-primary, #0a0a0f);
  font-variant-numeric: tabular-nums;
}
.notify-badge[hidden] { display: none; }
.notify-btn.is-ringing svg { animation: notify-ring 1.1s ease-in-out 1; transform-origin: 50% 8%; }
@keyframes notify-ring {
  0%, 100% { transform: rotate(0); } 15% { transform: rotate(16deg); } 30% { transform: rotate(-14deg); }
  45% { transform: rotate(10deg); } 60% { transform: rotate(-8deg); } 75% { transform: rotate(4deg); }
}

.notify-panel, .notify-toast {
  position: absolute; top: calc(100% + 12px); inset-inline-start: 0; z-index: 1200;
  width: 330px; max-width: calc(100vw - 24px); box-sizing: border-box;
  background: var(--bg-card, #14151f); border: 1px solid var(--border-light, #2a2f45);
  border-radius: 12px; box-shadow: 0 14px 40px rgba(0, 0, 0, 0.55); color: var(--text-primary, #fff);
}
.notify-panel[hidden], .notify-toast[hidden] { display: none; }
.notify-list { list-style: none; margin: 0; padding: 6px; max-height: 340px; overflow-y: auto; }
.notify-item {
  display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border-radius: 8px;
  color: var(--text-primary, #fff); text-decoration: none; font-size: 0.9rem; line-height: 1.4; overflow-wrap: anywhere;
}
.notify-item:hover, .notify-item:focus-visible { background: rgba(99, 102, 241, 0.16); outline: none; }
.notify-item-date { font-size: 0.75rem; color: var(--text-muted, #7c8099); }
.notify-empty { padding: 18px 12px; text-align: center; color: var(--text-muted, #7c8099); font-size: 0.9rem; }
.notify-footer { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--border, #20233a); }
.notify-link { background: none; border: 0; padding: 0; font: inherit; font-size: 0.82rem; font-weight: 600; color: var(--accent-light, #818cf8); cursor: pointer; text-decoration: none; }
.notify-link:hover { text-decoration: underline; }

.notify-toast { padding: 12px 16px; font-size: 0.88rem; font-weight: 600; cursor: pointer; border-color: var(--accent, #6366f1); animation: notify-pop .25s ease-out; }
.notify-toast::before {
  content: ""; position: absolute; top: -6px; inset-inline-start: 16px; width: 10px; height: 10px; transform: rotate(45deg);
  background: var(--bg-card, #14151f); border-top: 1px solid var(--accent, #6366f1); border-inline-start: 1px solid var(--accent, #6366f1);
}
@keyframes notify-pop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

@media (max-width: 640px) {   /* phones: panel is pinned under the navbar so it can never run off-screen */
  .notify-root { position: static; }
  .notify-panel, .notify-toast { position: fixed; top: 64px; inset-inline: 12px; width: auto; max-width: none; }
  .notify-toast::before { display: none; }
}
@media (prefers-reduced-motion: reduce) { .notify-btn.is-ringing svg, .notify-toast { animation: none; } }
