.web-notification-wrap { position: relative; }
.web-notification-button { position: relative; width: 44px; height: 44px; display: grid; place-items: center; overflow: visible; border-radius: 14px; background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.web-notification-button svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.web-notification-button b { position: absolute; z-index: 2; right: 2px; top: 2px; min-width: 19px; height: 19px; display: grid; place-items: center; padding: 0 5px; border-radius: 999px; background: #ff3d57; color: white; font-size: 10px; line-height: 1; }
.web-notification-button b[hidden] { display: none; }
.web-notification-popup { position: absolute; z-index: 160; right: 0; top: 52px; width: min(410px, calc(100vw - 32px)); max-height: min(620px, calc(100vh - 90px)); display: none; grid-template-rows: auto minmax(0, 1fr) auto; overflow: hidden; border: 1px solid rgba(255,255,255,.12); border-radius: 18px; background: rgba(24,28,31,.98); color: var(--text); box-shadow: 0 24px 70px rgba(0,0,0,.58); backdrop-filter: blur(20px); }
.web-notification-popup.open { display: grid; }
.web-notification-popup > header { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-bottom: 1px solid rgba(255,255,255,.08); }
.web-notification-popup h3 { margin: 0; font-size: 18px; }
.web-notification-popup header div { display: flex; align-items: center; gap: 4px; }
.web-notification-popup header button { min-height: 34px; padding: 0 8px; border-radius: 9px; background: transparent; color: var(--muted); font-size: 11px; font-weight: 850; }
.web-notification-popup header button:hover { color: var(--accent); background: rgba(30,215,96,.1); }
.web-notification-list { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.web-notification-all { min-height: 48px; border-top: 1px solid rgba(255,255,255,.08); background: transparent; color: var(--accent); font-size: 13px; font-weight: 900; }

.notification-item { position: relative; width: 100%; min-height: 78px; display: grid; grid-template-columns: 46px minmax(0,1fr) 12px; gap: 10px; align-items: center; padding: 11px 13px; border-bottom: 1px solid rgba(255,255,255,.07); background: transparent; color: var(--text); text-align: left; }
.notification-item::before { content: ""; position: absolute; inset: 10px auto 10px 0; width: 3px; border-radius: 999px; background: #5c6970; }
.notification-item.type-status::before, .notification-item.type-complete::before { background: var(--accent); }
.notification-item.type-content::before { background: #4c8fe8; }
.notification-item.type-owner::before, .notification-item.type-studio::before { background: #2ecbb2; }
.notification-item.type-record::before { background: #9569f3; }
.notification-item.type-task::before { background: #f29a3d; }
.notification-item.type-danger::before { background: #ff5c6f; }
.notification-item:hover { background: rgba(255,255,255,.035); }
.notification-item.is-read { opacity: .58; }

.notification-target-highlight {
  position: relative;
  z-index: 1;
  animation: notification-target-pulse 2.8s ease-out;
}

@keyframes notification-target-pulse {
  0%, 24% { outline: 3px solid var(--accent); box-shadow: 0 0 0 7px rgba(30, 215, 96, .24), 0 0 28px rgba(30, 215, 96, .34); }
  70% { outline: 2px solid rgba(30, 215, 96, .5); box-shadow: 0 0 0 3px rgba(30, 215, 96, .1); }
  100% { outline: 0 solid transparent; box-shadow: none; }
}
.notification-avatar { position: relative; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; background: linear-gradient(145deg,#31383d,#202529); color: white; font-size: 16px; font-weight: 950; }
.notification-avatar i { position: absolute; right: -4px; bottom: -4px; width: 18px; height: 18px; display: grid; place-items: center; border-radius: 6px; background: #2a3338; color: var(--accent); font-size: 10px; font-style: normal; }
.notification-copy { min-width: 0; display: grid; gap: 3px; }
.notification-copy strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.notification-copy > span { display: -webkit-box; overflow: hidden; color: #d4d8da; font-size: 12px; line-height: 1.4; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.notification-copy small { color: var(--muted); font-size: 10px; }
.notification-unread-dot { width: 8px; height: 8px; border-radius: 999px; background: var(--accent); box-shadow: 0 0 0 4px rgba(30,215,96,.1); }
.notification-empty { min-height: 180px; display: grid; place-items: center; align-content: center; gap: 6px; color: var(--muted); text-align: center; }
.notification-empty span { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 999px; background: rgba(30,215,96,.1); color: var(--accent); font-size: 20px; }
.notification-empty strong { color: var(--near); }
.notification-empty.compact { min-height: 130px; }

.notification-center-modal { z-index: 380; align-items: center; background: rgba(0,0,0,.72); }
.notification-center-card { width: min(760px, calc(100vw - 28px)); height: min(820px, calc(100dvh - 32px)); display: grid; grid-template-rows: auto auto auto minmax(0,1fr); gap: 0; overflow: hidden; padding: 0; border-radius: 22px; background: #171b1e; }
.notification-center-head { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; border-bottom: 1px solid rgba(255,255,255,.09); }
.notification-center-head h2 { margin: 0; }
.notification-center-head > div { display: flex; gap: 6px; }
.notification-center-list { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 14px 18px; }
.notification-date-group { display: grid; }
.notification-date-group h3 { position: sticky; top: 0; z-index: 2; margin: 0; padding: 14px 2px 8px; background: #171b1e; color: #aab1b5; font-size: 12px; }
.notification-date-group .notification-item { border-radius: 14px; margin-bottom: 6px; background: #1d2225; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
.notification-show-read { min-height: 44px; display: flex !important; align-items: center; justify-content: flex-end; gap: 8px; padding: 0 18px; color: var(--muted); font-size: 12px; }
.notification-show-read input { width: 18px; height: 18px; accent-color: var(--accent); }
.notification-settings { display: none; padding: 0 18px 12px; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
.notification-settings.open { display: grid; }
.notification-settings header { grid-column: 1/-1; display: flex; align-items: end; justify-content: space-between; padding: 8px 0; }
.notification-settings h3 { margin: 0; font-size: 16px; }
.notification-settings header span { color: var(--muted); font-size: 11px; }
.notification-settings label { min-height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 11px; border-radius: 11px; background: rgba(255,255,255,.045); color: var(--near); font-size: 11px; font-weight: 800; }
.notification-settings label input { position: absolute; opacity: 0; }
.notification-settings label i { position: relative; width: 38px; height: 22px; flex: 0 0 auto; border-radius: 999px; background: #41484c; }
.notification-settings label i::after { content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; border-radius: 999px; background: white; transition: transform .16s ease; }
.notification-settings label:has(input:checked) i { background: var(--accent); }
.notification-settings label:has(input:checked) i::after { transform: translateX(16px); }
.notification-clear-modal { z-index: 460; }

@media (max-width: 768px) {
  .web-notification-wrap { display: none; }
  .mobile-notification-page { min-height: calc(100dvh - 168px); display: grid; align-content: start; gap: 10px; padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
  .mobile-notification-page > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
  .mobile-notification-page > header h2 { margin: 0; font-size: 24px; }
  .mobile-notification-page > header div { display: flex; gap: 4px; }
  .mobile-notification-page > header button { min-height: 38px; padding: 0 9px; border-radius: 10px; background: rgba(255,255,255,.06); color: var(--near); font-size: 10px; font-weight: 900; }
  .mobile-notification-list { display: grid; gap: 4px; }
  .mobile-notification-page .notification-show-read { justify-content: flex-start; padding: 0; }
  .mobile-notification-page .notification-date-group h3 { background: #0b0f12; }
  .mobile-notification-page .notification-item { min-height: 86px; grid-template-columns: 48px minmax(0,1fr) 12px; border-radius: 15px; margin-bottom: 7px; padding: 12px; background: #161b1f; box-shadow: inset 0 0 0 1px rgba(255,255,255,.07); }
  .mobile-notification-page .notification-copy strong { font-size: 14px; }
  .mobile-notification-page .notification-copy > span { font-size: 12px; }
  .mobile-notification-page .notification-settings { grid-template-columns: 1fr; padding: 0; }
  .mobile-notification-page .notification-settings label { min-height: 46px; }
  .notification-center-modal { display: none !important; }
  .notification-clear-modal { align-items: center; padding: 14px; }
}
