/* Full-page Notifications Center (/notifications) */
.notif-page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 20px 64px;
}

.notif-page-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px;
  margin-bottom: 22px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-top: 2px solid var(--brand-cyan);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.notif-page-hero__eyebrow {
  margin: 0 0 4px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand-cyan);
}

.notif-page-hero__title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.notif-page-hero h1 {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--text-primary);
}

.notif-page-hero__subtitle {
  margin: 6px 0 0;
  color: var(--text-secondary);
  font-size: 0.94rem;
}

.notif-kpi-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  background: var(--selection-surface);
  color: var(--brand-cyan);
  border: 1px solid rgba(var(--brand-cyan-rgb), 0.45);
}

.notif-kpi-pill[data-count="0"] {
  background: var(--bg-input);
  color: var(--text-muted);
  border-color: var(--border);
}

.notif-page-hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.notif-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: border-color var(--transition-fast), background-color var(--transition-fast), color var(--transition-fast);
}

.notif-page-btn:hover:not(:disabled),
.notif-page-btn:focus-visible {
  border-color: var(--brand-cyan);
  background: var(--selection-surface);
  color: var(--text-primary);
}

.notif-page-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.notif-page-btn--primary {
  background: var(--action-surface);
  border-color: var(--brand-orange);
}

.notif-page-btn--primary:hover:not(:disabled) {
  background: var(--action-surface-hover);
  border-color: var(--brand-orange-hover);
}

.notif-page-btn--danger {
  color: var(--error-color);
  border-color: rgba(239, 106, 114, 0.5);
}

.notif-page-btn--danger:hover:not(:disabled) {
  background: rgba(239, 106, 114, 0.14);
  border-color: var(--error-color);
  color: var(--error-color);
}

.notif-page-layout {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.notif-sidebar {
  position: sticky;
  top: calc(var(--pf-sticky-header, 92px) + 16px);
  padding: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.notif-sidebar__title {
  margin: 2px 8px 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.notif-sidebar__list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.notif-cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-left: 3px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background-color var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}

.notif-cat-item:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.notif-cat-item.is-active {
  background: var(--selection-surface);
  border-left-color: var(--brand-cyan);
  color: var(--text-primary);
}

.notif-cat-item__badges {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.notif-cat-item__total {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.notif-cat-item__unread {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--radius-full);
  background: var(--brand-orange);
  color: #0b1020;
  font-size: 0.7rem;
  font-weight: 800;
}

.notif-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.notif-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.notif-search-wrap {
  position: relative;
  flex: 1 1 240px;
  min-width: 200px;
}

.notif-search-wrap svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.notif-search-input {
  width: 100%;
  min-height: 38px;
  padding: 8px 12px 8px 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 0.9rem;
}

.notif-search-input:focus {
  outline: none;
  border-color: var(--brand-cyan);
  box-shadow: var(--focus-ring);
}

.notif-segmented {
  display: inline-flex;
  padding: 3px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-input);
  gap: 3px;
}

.notif-seg-btn {
  min-height: 32px;
  padding: 5px 14px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.notif-seg-btn.is-active {
  background: var(--selection-surface);
  color: var(--text-primary);
  box-shadow: inset 0 0 0 1px rgba(var(--brand-cyan-rgb), 0.5);
}

.notif-feed {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.notif-date-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 4px 2px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.notif-date-divider:first-child {
  margin-top: 0;
}

.notif-date-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.notif-card {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--notif-accent, var(--border-hover));
  border-radius: var(--radius-md);
  transition: background-color var(--transition-fast), border-color var(--transition-fast), opacity var(--transition-fast);
}

.notif-card--stacked {
  margin-top: 6px;
  box-shadow: 0 3px 0 -1px var(--bg-primary), 0 4px 0 0 var(--border);
}

.notif-card__stack-badge {
  position: absolute;
  top: -9px;
  right: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 22px;
  padding: 0 8px;
  border-radius: var(--radius-full);
  background: var(--brand-orange);
  color: #0b1020;
  border: 2px solid var(--bg-primary);
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.notif-card__stack-badge:hover {
  filter: brightness(1.1);
}

.notif-card__stack-list {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.notif-card__stack-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  border: 1px solid var(--border);
  font-size: 0.86rem;
}

.notif-card__stack-row.is-unread {
  border-left: 2px solid var(--brand-cyan);
}

.notif-card__stack-row-main {
  min-width: 0;
  flex: 1 1 auto;
}

.notif-card__stack-row-main a {
  color: var(--brand-cyan);
  font-weight: 600;
}

.notif-card__stack-row-time {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.notif-card__stack-row-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.notif-card:hover {
  background: var(--bg-elevated);
  border-color: var(--border-hover);
  border-left-color: var(--notif-accent, var(--brand-cyan));
}

.notif-card.is-unread {
  background: color-mix(in srgb, var(--bg-surface) 84%, var(--brand-cyan));
  border-color: rgba(var(--brand-cyan-rgb), 0.35);
  border-left-color: var(--notif-accent, var(--brand-cyan));
}

.notif-card.is-read {
  opacity: 0.82;
}

.notif-card.is-read:hover {
  opacity: 1;
}

.notif-card--booru { --notif-accent: var(--brand-cyan); }
.notif-card--social { --notif-accent: #c084fc; }
.notif-card--credits,
.notif-card--dailies { --notif-accent: var(--warning-color); }
.notif-card--generator { --notif-accent: #38bdf8; }
.notif-card--contest,
.notif-card--bounty { --notif-accent: var(--success-color); }
.notif-card--suggestion { --notif-accent: #60a5fa; }
.notif-card--upgrade,
.notif-card--lora_preview_approved { --notif-accent: var(--success-color); }
.notif-card--moderation,
.notif-card--lora_preview_rejected { --notif-accent: var(--error-color); }

.notif-card__icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--notif-accent, var(--brand-cyan));
}

.notif-card__body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.notif-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.notif-card__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.notif-card__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-cyan);
}

.notif-card__type {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
}

.notif-card__time {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.notif-card__controls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.notif-card__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 30px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.notif-card__btn:hover {
  border-color: var(--brand-cyan);
  color: var(--text-primary);
}

.notif-card__btn--view {
  background: var(--selection-surface);
  border-color: rgba(var(--brand-cyan-rgb), 0.45);
  color: var(--brand-cyan);
}

.notif-card__btn--dismiss:hover {
  border-color: var(--error-color);
  color: var(--error-color);
}

.notif-card__message {
  color: var(--text-secondary);
  font-size: 0.94rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.notif-card.is-unread .notif-card__message {
  color: var(--text-primary);
}

.notif-card__message a {
  color: var(--brand-cyan);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.notif-card__preview {
  margin-top: 4px;
  padding: 8px;
  border-radius: var(--radius-md);
  background: var(--bg-input);
  border: 1px solid var(--border);
}

.notif-card__preview img,
.notif-card__preview video {
  max-width: 100%;
  max-height: 200px;
  border-radius: var(--radius-sm);
  display: block;
}

.notif-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 10px;
  padding: 48px 24px;
  background: var(--bg-surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
}

.notif-empty-state strong {
  color: var(--text-primary);
  font-size: 1.05rem;
}

.notif-empty-state p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.notif-load-more-wrap {
  display: flex;
  justify-content: center;
  padding-top: 8px;
}

.notif-login-prompt {
  max-width: 560px;
  margin: 48px auto;
  padding: 32px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--brand-cyan);
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  text-align: center;
}

@media (max-width: 860px) {
  .notif-page {
    padding: 18px 12px 48px;
  }

  .notif-page-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .notif-sidebar {
    position: static;
    padding: 10px;
  }

  .notif-sidebar__list {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .notif-cat-item {
    width: auto;
    flex: 0 0 auto;
    white-space: nowrap;
    border: 1px solid var(--border);
    border-left-width: 1px;
    border-radius: var(--radius-full);
    padding: 6px 12px;
  }

  .notif-cat-item.is-active {
    border-color: var(--brand-cyan);
  }
}
