.app-nav-notif{ position:relative; }
.app-nav-avatar-wrap{ order:10; }
.app-nav-badge{
  position:absolute; top:-2px; right:-4px; min-width:18px; height:18px; padding:0 5px; border-radius:9px;
  background:var(--ui-danger); color:#FFFFFF; font-size:10px; font-weight:var(--font-weight-semibold); line-height:18px;
  text-align:center; box-shadow:0 0 0 2px var(--md-color-grey-white); pointer-events:none; z-index:1;
}
.app-nav-badge[hidden]{ display:none; }

.notif-panel{
  position:fixed; left:72px; top:12px; bottom:12px; width:400px; max-width:calc(100vw - 84px); z-index:var(--z-notifications);
  display:flex; flex-direction:column; background:var(--ui-surface); border:1px solid var(--ui-border);
  border-radius:16px; box-shadow:var(--shadow-raised); overflow:hidden;
  animation:notif-panel-in .22s cubic-bezier(.2,.8,.2,1);
  font-family:var(--font-sans); color:var(--ui-text);
}
.notif-panel[hidden]{ display:none; }
@keyframes notif-panel-in{ from{ opacity:0; transform:translateX(-8px); } to{ opacity:1; transform:none; } }

.notif-head{ display:flex; align-items:center; justify-content:space-between; padding:18px 20px 8px 20px; }
.notif-head h2{ margin:0; font-size:var(--text-xl); font-weight:var(--font-weight-semibold); }
.notif-tabs{ display:flex; gap:4px; padding:0 12px; border-bottom:1px solid var(--ui-border); }
.notif-tab{
  border:none; background:none; cursor:pointer; padding:8px 10px 10px; font-family:inherit; font-size:var(--text-md);
  color:var(--ui-muted); position:relative;
}
.notif-tab.active{ color:var(--ui-text); font-weight:var(--font-weight-semibold); }
.notif-tab.active::after{ content:''; position:absolute; left:8px; right:8px; bottom:-1px; height:2px; border-radius:2px; background:var(--ui-text); }
.notif-toolbar{ display:flex; align-items:center; justify-content:space-between; padding:10px 16px 6px; }
.notif-chips{ display:flex; gap:6px; }
.notif-chip{
  display:inline-flex; align-items:center; gap:6px; height:28px; padding:0 10px; border-radius:14px; cursor:pointer;
  border:1px dashed var(--ui-border-strong); background:none; color:var(--ui-text-2); font-family:inherit; font-size:var(--text-sm);
}
.notif-chip i{ font-size:var(--text-sm); }
.notif-chip:hover{ background:var(--md-neutral-background-2-rest); }
.notif-chip.active{ border-style:solid; border-color:var(--ui-accent); color:var(--ui-accent); background:var(--ui-accent-soft); }
.notif-read-all{ color:var(--ui-muted); }

.notif-list{ flex:1; overflow-y:auto; padding:4px 12px 16px; }
.notif-group-label{ padding:12px 8px 6px; font-size:var(--text-sm); color:var(--ui-muted); }
.notif-card{
  position:relative; display:flex; gap:12px; align-items:flex-start; padding:12px 12px 12px 22px; border-radius:12px;
  cursor:pointer; transition:background .12s;
}
.notif-card:hover, .notif-card:focus-visible{ background:var(--md-neutral-background-2-rest); outline:none; }
.notif-dot{ position:absolute; left:8px; top:20px; width:7px; height:7px; border-radius:50%; background:var(--ui-accent); opacity:0; }
.notif-card.unread .notif-dot{ opacity:1; }
.notif-avatar{ position:relative; width:36px; height:36px; flex-shrink:0; }
.notif-avatar-img, .notif-avatar-initial{
  display:flex; align-items:center; justify-content:center; width:36px; height:36px; border-radius:10px; overflow:hidden;
  background:var(--ui-accent); color:#FFFFFF; font-size:var(--text-md); font-weight:var(--font-weight-semibold);
}
.notif-avatar-img img{ width:100%; height:100%; object-fit:cover; display:block; }
.notif-type-badge{
  position:absolute; right:-5px; bottom:-5px; width:18px; height:18px; border-radius:50%; background:var(--ui-text);
  color:var(--ui-surface); display:flex; align-items:center; justify-content:center; font-size:9px; border:2px solid var(--ui-surface);
}
.notif-main{ flex:1; min-width:0; display:flex; flex-direction:column; gap:3px; }
.notif-title{ font-size:var(--text-md); color:var(--ui-text); line-height:1.35; }
.notif-title b{ font-weight:var(--font-weight-semibold); }
.notif-body{ font-size:var(--text-sm); color:var(--ui-text-2); line-height:1.4; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.notif-target{ display:flex; align-items:center; gap:6px; font-size:var(--text-sm); color:var(--ui-text-2); min-width:0; }
.notif-target i{ color:var(--ui-muted); flex-shrink:0; }
.notif-target span{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.notif-deck-list{ display:flex; flex-direction:column; gap:2px; min-width:0; }
.notif-deck-link{ text-decoration:none; }
.notif-deck-link:hover span{ color:var(--ui-text); text-decoration:underline; }
.notif-side{ flex-shrink:0; display:flex; align-items:flex-start; min-height:24px; }
.notif-date{ font-size:var(--text-xs); color:var(--ui-muted); white-space:nowrap; padding-top:3px; }
.notif-actions{
  display:none; gap:2px; padding:2px; border-radius:8px; background:var(--ui-surface); border:1px solid var(--ui-border);
  box-shadow:var(--shadow-xs); position:absolute; top:8px; right:8px; z-index:1;
}
.notif-actions button{
  width:26px; height:24px; border:none; border-radius:6px; background:none; cursor:pointer; color:var(--ui-text-2);
  display:flex; align-items:center; justify-content:center; font-size:var(--text-sm);
}
.notif-actions button:hover{ background:var(--md-neutral-background-2-rest); color:var(--ui-text); }
.notif-card:hover .notif-date, .notif-card:focus-within .notif-date{ visibility:hidden; }
.notif-card:hover .notif-actions, .notif-card:focus-within .notif-actions{ display:flex; }
.notif-card.pinned .notif-actions [data-act="pin"]{ color:var(--ui-accent); }
.notif-card:not(.unread) .notif-actions [data-act="read"]{ color:var(--ui-accent); }
.notif-empty{ display:flex; flex-direction:column; align-items:center; gap:10px; padding:40px 16px; color:var(--ui-muted); font-size:var(--text-md); text-align:center; }
.notif-empty i{ font-size:28px; }
.notif-empty img{ width:132px; height:auto; display:block; }
.notif-empty-trash{ color:var(--ui-muted); }
.notif-empty-trash:hover{ color:var(--ui-danger); }
.notif-actions [data-act="delete"]:hover{ color:var(--ui-danger); }

.notif-decision{ display:flex; gap:8px; margin-top:6px; visibility:hidden; }
.notif-card:hover .notif-decision, .notif-card:focus-within .notif-decision{ visibility:visible; }
@media (hover: none){ .notif-decision{ visibility:visible; } }

@media (max-width: 767px){
  .notif-panel{ left:0; right:0; top:0; bottom:0; width:auto; max-width:none; border-radius:0; border:none; }
  .app-nav-badge{ top:0; right:0; }
}

.app-nav-item[data-nav="admin"]{ order:6; }
