/* ==========================================================================
   RepHub — notification bell + drawer
   Matches the site palette: black surfaces, dark-green borders, neon accent.
   ========================================================================== */

header.nav .notif-btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #0d110d;
  color: var(--muted);
  cursor: pointer;
  transition: border-color .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
}
header.nav .notif-btn:hover {
  color: var(--text);
  border-color: #2b3a2f;
  transform: translateY(-1px);
  box-shadow: 0 10px 24px -18px var(--accent);
}
header.nav .notif-btn:active { transform: translateY(0); }
header.nav .notif-btn svg { width: 20px; height: 20px; }
header.nav .notif-btn.has-unread { color: var(--accent); border-color: #2f4224; }
header.nav .notif-btn.has-unread svg { filter: drop-shadow(0 0 8px #9ef01a66); }
header.nav .notif-badge {
  position: absolute; top: -5px; right: -5px;
  min-width: 18px; height: 18px; padding: 0 5px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px;
  background: var(--accent); color: #0a0d0a;
  font-size: 10.5px; font-weight: 800; line-height: 1;
  border: 2px solid var(--bg);
  box-shadow: 0 0 12px -2px #9ef01acc;
}

/* ---------------------------------------------------------------- drawer */
.notif-backdrop {
  position: fixed; inset: 0; z-index: 120;
  background: #000000b3;
  backdrop-filter: blur(2px);
  opacity: 0; pointer-events: none;
  transition: opacity .2s ease;
}
.notif-backdrop.open { opacity: 1; pointer-events: auto; }

.notif-panel {
  position: fixed; z-index: 125;
  top: 0; right: 0; bottom: 0;
  width: min(400px, 94vw);
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, #0d110d 0%, #0a0d0a 100%);
  border-left: 1px solid var(--border);
  box-shadow: -30px 0 70px -40px #000, -1px 0 0 #9ef01a12;
  transform: translateX(104%);
  transition: transform .26s cubic-bezier(.22,.8,.3,1);
  color: var(--text);
}
.notif-panel.open { transform: none; }

.notif-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 20px 14px;
}
.notif-head h3 { margin: 0; font-size: 19px; font-weight: 800; letter-spacing: -.2px; }
.notif-x {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 10px;
  background: transparent; border: 1px solid transparent;
  color: var(--muted); cursor: pointer;
  transition: color .15s ease, background .15s ease, border-color .15s ease;
}
.notif-x:hover { color: var(--text); background: #10151069; border-color: var(--border); }
.notif-x svg { width: 17px; height: 17px; }

.notif-actions {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 0 20px 14px;
  border-bottom: 1px solid var(--border-soft);
}
.notif-count { font-size: 13px; color: var(--muted); }
.notif-count b { color: var(--accent); font-weight: 700; }
.notif-readall {
  border: 1px solid #2b3a2f; background: #0e140d; color: var(--accent);
  border-radius: 10px; padding: 7px 13px; font-size: 12.5px; font-weight: 700;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.notif-readall:hover:not(:disabled) {
  background: var(--accent-soft); border-color: var(--accent);
  box-shadow: 0 8px 22px -16px var(--accent);
}
.notif-readall:disabled { opacity: .4; cursor: default; }

.notif-list {
  flex: 1; overflow-y: auto; overscroll-behavior: contain;
  padding: 12px; display: grid; gap: 8px; align-content: start;
  scrollbar-width: thin; scrollbar-color: #23301f transparent;
}
.notif-list::-webkit-scrollbar { width: 8px; }
.notif-list::-webkit-scrollbar-thumb { background: #1c2519; border-radius: 8px; }

.notif-item {
  position: relative;
  display: grid; grid-template-columns: 34px 1fr auto; gap: 11px; align-items: start;
  padding: 12px 12px 12px 13px;
  border-radius: 14px;
  background: #0e120e;
  border: 1px solid var(--border-soft);
  color: inherit; text-decoration: none;
  cursor: pointer;
  animation: notif-in .22s ease both;
  transition: background .16s ease, border-color .16s ease, transform .16s ease;
}
.notif-item:hover { background: #111710; border-color: #263021; transform: translateX(-2px); }
.notif-item.unread { border-color: #26331f; background: #0f150e; }
.notif-item.unread::before {
  content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 2px;
  border-radius: 2px; background: var(--accent); box-shadow: 0 0 10px -1px var(--accent);
}
@keyframes notif-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.notif-ic {
  width: 34px; height: 34px; border-radius: 11px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border);
  background: #10151066; color: var(--muted);
}
.notif-ic svg { width: 17px; height: 17px; }
.notif-item[data-level="success"] .notif-ic { color: var(--accent);  border-color: #2c3d22; background: #9ef01a12; }
.notif-item[data-level="warning"] .notif-ic { color: #f5c451;        border-color: #3c3520; background: #f5c45112; }
.notif-item[data-level="danger"]  .notif-ic { color: var(--danger);  border-color: #3d2323; background: #f8717112; }
.notif-item[data-level="info"]    .notif-ic { color: #6fb3ff;        border-color: #22303d; background: #6fb3ff10; }

.notif-body { display: grid; gap: 3px; min-width: 0; }
.notif-t { font-weight: 700; font-size: 13.5px; line-height: 1.35; }
.notif-d {
  font-size: 12.5px; color: var(--muted); line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.notif-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.notif-time { font-size: 11.5px; color: #5f6a61; white-space: nowrap; }
.notif-del {
  width: 24px; height: 24px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid transparent; background: transparent; color: #4d574f;
  cursor: pointer; opacity: 0;
  transition: opacity .16s ease, color .16s ease, background .16s ease, border-color .16s ease;
}
.notif-item:hover .notif-del { opacity: 1; }
.notif-del:hover { color: var(--danger); background: #f8717110; border-color: #3d2323; }
.notif-del svg { width: 13px; height: 13px; }
.notif-item.removing { opacity: 0; transform: translateX(24px); transition: all .18s ease; }

.notif-empty {
  display: grid; justify-items: center; gap: 6px;
  padding: 90px 20px; text-align: center;
}
.notif-empty svg { width: 46px; height: 46px; color: #2f3a30; margin-bottom: 4px; }
.notif-empty b { font-size: 15px; font-weight: 800; }
.notif-empty span { font-size: 13px; color: var(--muted); }
.notif-more { padding: 10px; text-align: center; font-size: 12.5px; color: var(--muted); }

.notif-foot {
  border-top: 1px solid var(--border-soft);
  padding: 14px 18px;
}
.notif-foot a {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; color: var(--muted);
  transition: color .16s ease;
}
.notif-foot a:hover { color: var(--accent); }
.notif-foot svg { width: 16px; height: 16px; }

body.notif-open { overflow: hidden; }

@media (max-width: 860px) {
  header.nav .notif-btn { width: 38px; height: 38px; }
  .notif-panel { width: 100vw; border-left: 0; }
}
