/* ============================================================
   Panel riwayat notifikasi — dropdown (desktop) / drawer (mobile)
   Memakai token glass & warna yang sama dengan tema aplikasi.
   ============================================================ */
.hd-bell { position: relative; cursor: pointer; }
.hd-bell.has-new::after {
  content: "";
  position: absolute; inset: -4px;
  border-radius: inherit;
  border: 1px solid var(--nc, rgba(120, 175, 255, .55));
  animation: nbPulse 1.8s ease-out infinite;
  pointer-events: none;
}
@keyframes nbPulse { 0% { opacity: .8; transform: scale(.94); } 100% { opacity: 0; transform: scale(1.12); } }

.notif-panel-wrap { position: fixed; inset: 0; z-index: 1200; }
.notif-panel-wrap[hidden] { display: none; }
.notif-backdrop { position: absolute; inset: 0; background: rgba(3, 8, 22, .55); backdrop-filter: blur(2px); }

.notif-panel {
  position: absolute;
  top: 68px; right: 16px;
  width: min(420px, calc(100vw - 24px));
  max-height: min(76vh, 620px);
  display: flex; flex-direction: column;
  background: var(--glass-bg-2, rgba(22, 34, 66, .95));
  border: 1px solid var(--glass-brd-2, rgba(120, 170, 255, .3));
  border-radius: 18px;
  box-shadow: 0 26px 60px rgba(2, 6, 20, .6);
  backdrop-filter: blur(18px) saturate(140%);
  overflow: hidden;
  animation: npIn .22s ease-out;
}
@keyframes npIn { from { opacity: 0; transform: translateY(-8px) scale(.98); } to { opacity: 1; transform: none; } }

.notif-panel .np-head {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--glass-brd, rgba(90, 140, 255, .18));
}
.notif-panel .np-title { margin: 0; font-size: .98rem; font-weight: 800; color: #fff; }
.notif-panel .np-sub { margin: 2px 0 0; font-size: .74rem; color: var(--txt-dim, rgba(200, 214, 245, .7)); }
.notif-panel .np-head-act { margin-left: auto; display: flex; align-items: center; gap: 8px; flex: none; }
.notif-panel .np-act {
  font-size: .72rem; font-weight: 700; color: #cfe0ff;
  background: rgba(47, 139, 255, .16);
  border: 1px solid rgba(120, 170, 255, .3);
  border-radius: 999px; padding: 6px 10px; cursor: pointer;
  transition: background .18s ease, opacity .18s ease;
}
.notif-panel .np-act:hover { background: rgba(47, 139, 255, .3); }
.notif-panel .np-act:disabled { opacity: .45; cursor: not-allowed; }
.notif-panel .np-x {
  width: 30px; height: 30px; border-radius: 10px; cursor: pointer;
  background: transparent; border: 1px solid var(--glass-brd, rgba(90, 140, 255, .2));
  color: #dbe7ff; font-size: 1.1rem; line-height: 1;
}

.notif-panel .np-list { overflow-y: auto; padding: 8px; flex: 1 1 auto; }
.notif-panel .np-empty,
.notif-panel .np-skeleton {
  padding: 26px 14px; text-align: center;
  font-size: .8rem; color: var(--txt-dim, rgba(200, 214, 245, .7));
}

.nh-item {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px 10px 14px;
  border-radius: 14px;
  border: 1px solid transparent;
  cursor: default;
  transition: background .16s ease, border-color .16s ease;
}
.nh-item:hover { background: rgba(120, 170, 255, .08); }
.nh-item.unread { background: rgba(47, 139, 255, .1); border-color: rgba(120, 170, 255, .22); cursor: pointer; }
.nh-item.unread::before {
  content: ""; position: absolute; left: 5px; top: 50%; transform: translateY(-50%);
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--nc, #2f8bff); box-shadow: 0 0 10px var(--nc, #2f8bff);
}
.nh-foto { width: 38px; height: 38px; border-radius: 12px; object-fit: cover; flex: none; border: 1px solid var(--glass-brd, rgba(90, 140, 255, .2)); }
.nh-body { min-width: 0; flex: 1 1 auto; }
.nh-top { display: flex; align-items: center; gap: 8px; }
.nh-nama { font-size: .86rem; font-weight: 700; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nh-status {
  flex: none; font-size: .66rem; font-weight: 800; letter-spacing: .03em; text-transform: uppercase;
  color: var(--nc, #2f8bff);
  border: 1px solid color-mix(in srgb, var(--nc, #2f8bff) 55%, transparent);
  background: color-mix(in srgb, var(--nc, #2f8bff) 16%, transparent);
  border-radius: 999px; padding: 2px 8px;
}
.nh-meta, .nh-time { font-size: .72rem; color: var(--txt-dim, rgba(200, 214, 245, .7)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nh-time { font-variant-numeric: tabular-nums; }
.nh-flag { flex: none; font-size: .64rem; font-weight: 700; color: var(--txt-dim, rgba(200, 214, 245, .6)); }
.nh-item.unread .nh-flag { color: #ffd166; }

.notif-panel .np-foot {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  border-top: 1px solid var(--glass-brd, rgba(90, 140, 255, .18));
}
.notif-panel .np-more {
  font-size: .74rem; font-weight: 700; color: #cfe0ff; cursor: pointer;
  background: rgba(120, 170, 255, .12);
  border: 1px solid var(--glass-brd-2, rgba(120, 170, 255, .3));
  border-radius: 999px; padding: 7px 12px;
}
.notif-panel .np-live { margin-left: auto; font-size: .68rem; color: var(--txt-dim, rgba(200, 214, 245, .6)); }

@media (max-width: 640px) {
  .notif-panel {
    top: auto; bottom: 0; right: 0; left: 0;
    width: 100%; max-height: 82vh;
    border-radius: 22px 22px 0 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    animation: npUp .24s ease-out;
  }
  @keyframes npUp { from { transform: translateY(18px); opacity: 0; } to { transform: none; opacity: 1; } }
  .notif-panel .np-act { font-size: .68rem; padding: 6px 9px; }
}
body.notif-open { overflow: hidden; }
