/* ============================================
   Modern Notification Center - Enterprise UX
   Inspired by: Slack, Teams, Linear, Notion
   ============================================ */

:root {
  --nc-bg: #f8f9fc;
  --nc-surface: #ffffff;
  --nc-border: #eef0f4;
  --nc-text: #1a1d23;
  --nc-text-secondary: #6b7280;
  --nc-text-muted: #9ca3af;
  --nc-primary: #4f46e5;
  --nc-primary-light: #eef2ff;
  --nc-primary-dark: #4338ca;
  --nc-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
  --nc-shadow-lg: 0 10px 40px rgba(0,0,0,0.08);
  --nc-radius: 12px;
  --nc-radius-sm: 8px;
  --nc-radius-lg: 16px;
  --nc-transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);

  --nc-critical: #ef4444;
  --nc-warning: #f59e0b;
  --nc-medium: #eab308;
  --nc-success: #22c55e;
  --nc-info: #3b82f6;

  --nc-critical-bg: #fef2f2;
  --nc-warning-bg: #fffbeb;
  --nc-success-bg: #f0fdf4;
  --nc-info-bg: #eff6ff;
}

/* Notification Center Layout - Full Width */
.nc-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  min-height: calc(100vh - 120px);
  background: var(--nc-bg);
  width: 100%;
  max-width: 100%;
}

/* Sidebar - Collapsible overlay */
.nc-sidebar {
  background: var(--nc-surface);
  border-right: 1px solid var(--nc-border);
  padding: 16px 0;
  overflow-y: auto;
  position: fixed;
  top: 60px;
  left: 0;
  height: calc(100vh - 60px);
  z-index: 50;
  width: 280px;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  box-shadow: var(--nc-shadow-lg);
}

.nc-sidebar.open {
  transform: translateX(0);
}

@media (min-width: 1024px) {
  .nc-sidebar {
    position: sticky;
    top: 0;
    transform: none;
    height: calc(100vh - 80px);
    box-shadow: none;
  }
}

/* Sidebar overlay backdrop */
.nc-sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  z-index: 40;
}

.nc-sidebar-overlay.open {
  display: block;
}

@media (min-width: 1024px) {
  .nc-sidebar-overlay {
    display: none !important;
  }
}

/* Main Content Area - Full Width */
.nc-main {
  padding: 20px 24px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

@media (min-width: 1280px) {
  .nc-main {
    padding: 24px 32px;
  }
}

@media (max-width: 1024px) {
  .nc-layout {
    grid-template-columns: 1fr;
  }
}

/* Sidebar */
.nc-sidebar {
  background: var(--nc-surface);
  border-right: 1px solid var(--nc-border);
  padding: 16px 0;
  overflow-y: auto;
  position: sticky;
  top: 0;
  height: calc(100vh - 80px);
}

.nc-sidebar-header {
  padding: 0 16px 16px;
  border-bottom: 1px solid var(--nc-border);
  margin-bottom: 8px;
}

.nc-sidebar-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--nc-text);
  letter-spacing: -0.01em;
}

.nc-sidebar-count {
  font-size: 11px;
  font-weight: 600;
  color: var(--nc-text-muted);
  margin-left: 8px;
}

/* Category Navigation */
.nc-category-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nc-category-item {
  display: flex;
  align-items: center;
  padding: 8px 16px;
  cursor: pointer;
  transition: var(--nc-transition);
  border-left: 3px solid transparent;
  position: relative;
}

.nc-category-item:hover {
  background: var(--nc-primary-light);
}

.nc-category-item.active {
  background: var(--nc-primary-light);
  border-left-color: var(--nc-primary);
}

.nc-category-item.active .nc-category-label {
  color: var(--nc-primary);
  font-weight: 600;
}

.nc-category-icon {
  font-size: 16px;
  margin-right: 10px;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}

.nc-category-label {
  font-size: 13px;
  color: var(--nc-text-secondary);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nc-category-badge {
  background: var(--nc-primary-light);
  color: var(--nc-primary);
  font-size: 11px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 10px;
  min-width: 20px;
  text-align: center;
  margin-left: 6px;
}

/* Main Content Area */
.nc-main {
  padding: 20px 24px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

@media (min-width: 1280px) {
  .nc-main {
    padding: 24px 32px;
  }
}

/* Header Bar */
.nc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

/* Language Toggle Button */
.nc-lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--nc-border);
  background: var(--nc-surface);
  color: var(--nc-text-secondary);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--nc-transition);
}
.nc-lang-btn:hover {
  background: var(--nc-primary-light);
  border-color: var(--nc-primary);
  color: var(--nc-primary);
}
.nc-lang-btn.active-km {
  background: var(--nc-primary);
  color: #fff;
  border-color: var(--nc-primary);
}

.nc-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nc-header-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--nc-text);
  letter-spacing: -0.02em;
}

.nc-live-status {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 20px;
  background: #ecfdf5;
  color: #059669;
}

.nc-live-status.offline {
  background: #fef2f2;
  color: #dc2626;
}

.nc-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  animation: pulse-dot 2s infinite;
}

.nc-live-status.offline .nc-live-dot {
  background: #ef4444;
  animation: none;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Search Bar */
.nc-search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--nc-surface);
  border: 1px solid var(--nc-border);
  border-radius: var(--nc-radius);
  padding: 0 12px;
  transition: var(--nc-transition);
  margin-bottom: 16px;
  position: relative;
}

.nc-search-bar:focus-within {
  border-color: var(--nc-primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1), var(--nc-shadow);
}

.nc-search-inner {
  display: flex;
  align-items: center;
  flex: 1;
  gap: 8px;
}

.nc-search-icon {
  color: var(--nc-text-muted);
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  transition: color 0.2s;
}

.nc-search-bar:focus-within .nc-search-icon {
  color: var(--nc-primary);
}

.nc-search-input {
  border: none;
  background: transparent;
  padding: 11px 0;
  font-size: 14px;
  color: var(--nc-text);
  width: 100%;
  outline: none;
}

.nc-search-input::placeholder {
  color: var(--nc-text-muted);
  font-size: 14px;
}

.nc-search-clear {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: none;
  background: var(--nc-border);
  border-radius: 6px;
  color: var(--nc-text-muted);
  cursor: pointer;
  transition: var(--nc-transition);
  flex-shrink: 0;
}

.nc-search-clear:hover {
  background: #e0e0e0;
  color: var(--nc-text);
}

.nc-search-kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 22px;
  padding: 0 6px;
  font-size: 11px;
  font-family: inherit;
  font-weight: 500;
  color: var(--nc-text-muted);
  background: var(--nc-bg);
  border: 1px solid var(--nc-border);
  border-radius: 5px;
  letter-spacing: 0.3px;
  flex-shrink: 0;
}

.nc-search-meta {
  flex-shrink: 0;
  padding-left: 8px;
  border-left: 1px solid var(--nc-border);
}

.nc-search-count {
  font-size: 12px;
  font-weight: 500;
  color: var(--nc-text-muted);
  white-space: nowrap;
}

/* Filter Chips */
.nc-filter-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}

.nc-filter-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  color: var(--nc-text-secondary);
  background: var(--nc-surface);
  border: 1px solid var(--nc-border);
  cursor: pointer;
  transition: var(--nc-transition);
  white-space: nowrap;
  flex-shrink: 0;
}

.nc-filter-chip:hover {
  border-color: var(--nc-primary);
  color: var(--nc-primary);
  background: var(--nc-primary-light);
}

.nc-filter-chip.active {
  background: var(--nc-primary);
  color: #fff;
  border-color: var(--nc-primary);
}

.nc-filter-chip-count {
  background: rgba(0,0,0,0.08);
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 8px;
  min-width: 16px;
  text-align: center;
}

.nc-filter-chip.active .nc-filter-chip-count {
  background: rgba(255,255,255,0.2);
  color: #fff;
}

/* Bulk Action Bar */
.nc-bulk-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--nc-primary-light);
  border-radius: var(--nc-radius-sm);
  margin-bottom: 12px;
  animation: slideDown 0.2s ease;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.nc-bulk-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--nc-primary);
  margin-right: auto;
}

.nc-bulk-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  background: var(--nc-surface);
  border: 1px solid var(--nc-border);
  color: var(--nc-text-secondary);
  cursor: pointer;
  transition: var(--nc-transition);
}

.nc-bulk-btn:hover {
  background: var(--nc-primary-light);
  border-color: var(--nc-primary);
  color: var(--nc-primary);
}

/* Notification Cards */
.nc-notification-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nc-card {
  background: var(--nc-surface);
  border: 1px solid var(--nc-border);
  border-radius: var(--nc-radius);
  padding: 16px;
  transition: var(--nc-transition);
  cursor: pointer;
  position: relative;
}

@media (min-width: 1025px) {
  .nc-card {
    padding: 18px 20px;
  }
}

.nc-card:hover {
  border-color: #d1d5db;
  box-shadow: var(--nc-shadow);
}

.nc-card.unread {
  border-left: 3px solid var(--nc-primary);
  background: #fafaff;
}

.nc-card.selected {
  border-color: var(--nc-primary);
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.15);
}

.nc-card-critical { border-left-color: var(--nc-critical); }
.nc-card-warning { border-left-color: var(--nc-warning); }
.nc-card-medium { border-left-color: var(--nc-medium); }
.nc-card-success { border-left-color: var(--nc-success); }
.nc-card-info { border-left-color: var(--nc-info); }

.nc-card-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

@media (min-width: 1280px) {
  .nc-card-header {
    gap: 16px;
  }
}

.nc-card-checkbox {
  margin-top: 2px;
  flex-shrink: 0;
}

.nc-card-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 2px solid #d1d5db;
  cursor: pointer;
  accent-color: var(--nc-primary);
}

.nc-card-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: var(--nc-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.nc-card-icon-wrap.critical { background: var(--nc-critical-bg); }
.nc-card-icon-wrap.warning { background: var(--nc-warning-bg); }
.nc-card-icon-wrap.success { background: var(--nc-success-bg); }
.nc-card-icon-wrap.info { background: var(--nc-info-bg); }

.nc-card-body {
  flex: 1;
  min-width: 0;
}

.nc-card-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.nc-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--nc-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nc-card-priority {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 1px 6px;
  border-radius: 4px;
  flex-shrink: 0;
}

.nc-card-priority.critical { background: var(--nc-critical-bg); color: var(--nc-critical); }
.nc-card-priority.warning { background: var(--nc-warning-bg); color: var(--nc-warning); }
/* Approved status → GREEN */
.nc-card-priority.success { background: #ecfdf5; color: #059669; }
.nc-card-priority.info { background: var(--nc-info-bg); color: var(--nc-info); }
/* Pending approval → RED */
.nc-card-priority.approval { background: #fef2f2; color: #dc2626; }

.nc-card-customer {
  font-size: 12px;
  font-weight: 500;
  color: var(--nc-text-secondary);
  margin-bottom: 4px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  line-height: 1.35;
}

.nc-card-customer-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  color: inherit;
  max-width: 100%;
}

.nc-card-customer-btn:hover .nc-card-customer-kh,
.nc-card-customer-btn:hover .nc-card-customer-eng {
  color: #4f46e5;
  text-decoration: underline;
}

.nc-card-customer-kh {
  color: var(--nc-text-secondary);
  font-weight: 600;
}

.nc-card-customer-eng {
  color: var(--nc-text-muted);
  font-weight: 500;
  font-size: 11.5px;
}

.nc-detail-customer-link {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  cursor: pointer;
  font: inherit;
  text-align: left;
  color: inherit;
}
.nc-detail-customer-link:hover {
  color: #4f46e5;
  text-decoration: underline;
}

.nc-card-message {
  font-size: 12px;
  color: var(--nc-text-muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.nc-card-meta {
  display: flex;
  align-items: center;
  gap: 8px 16px;
  margin-top: 8px;
  flex-wrap: wrap;
}

@media (min-width: 1025px) {
  .nc-card-meta {
    gap: 8px 20px;
  }
}

.nc-card-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--nc-text-muted);
}

.nc-card-meta-icon {
  font-size: 12px;
}

.nc-card-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-top: 8px;
  opacity: 0;
  transition: var(--nc-transition);
}

.nc-card:hover .nc-card-actions {
  opacity: 1;
}

.nc-card-action-btn {
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  color: var(--nc-text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: var(--nc-transition);
  display: flex;
  align-items: center;
  gap: 3px;
}

.nc-card-action-btn:hover {
  background: #f3f4f6;
  color: var(--nc-text-secondary);
}

.nc-card-action-btn.primary:hover {
  background: var(--nc-primary-light);
  color: var(--nc-primary);
}

/* Empty State */
.nc-empty-state {
  text-align: center;
  padding: 80px 20px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

@media (max-width: 768px) {
  .nc-empty-state {
    padding: 48px 16px;
  }
}

.nc-empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  display: block;
}

.nc-empty-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--nc-text);
  margin-bottom: 6px;
}

.nc-empty-text {
  font-size: 13px;
  color: var(--nc-text-muted);
  max-width: 400px;
  margin: 0 auto 20px;
  line-height: 1.5;
}

.nc-empty-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.nc-btn {
  padding: 8px 18px;
  border-radius: var(--nc-radius-sm);
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: var(--nc-transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nc-btn-primary {
  background: var(--nc-primary);
  color: #fff;
}

.nc-btn-primary:hover {
  background: var(--nc-primary-dark);
}

.nc-btn-secondary {
  background: var(--nc-surface);
  color: var(--nc-text-secondary);
  border: 1px solid var(--nc-border);
}

.nc-btn-secondary:hover {
  border-color: #d1d5db;
  background: #f9fafb;
}

/* Loading Skeleton */
.nc-skeleton {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nc-skeleton-card {
  background: var(--nc-surface);
  border: 1px solid var(--nc-border);
  border-radius: var(--nc-radius);
  padding: 16px;
}

.nc-skeleton-line {
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  margin-bottom: 8px;
}

.nc-skeleton-line:last-child { margin-bottom: 0; }

.nc-skeleton-line.w-30 { width: 30%; }
.nc-skeleton-line.w-50 { width: 50%; }
.nc-skeleton-line.w-70 { width: 70%; }

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Detail Drawer */
.nc-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  z-index: 1000;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.nc-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 440px;
  max-width: 100vw;
  height: 100vh;
  background: var(--nc-surface);
  z-index: 1001;
  box-shadow: -8px 0 40px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  animation: slideInRight 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideInRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.nc-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--nc-border);
}

.nc-drawer-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--nc-text);
}

.nc-drawer-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--nc-text-muted);
  cursor: pointer;
  transition: var(--nc-transition);
}

.nc-drawer-close:hover {
  background: #f3f4f6;
  color: var(--nc-text);
}

.nc-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.nc-detail-section {
  margin-bottom: 24px;
}

.nc-detail-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--nc-text-muted);
  margin-bottom: 12px;
}

.nc-detail-grid {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 8px 12px;
}

.nc-detail-label {
  font-size: 12px;
  color: var(--nc-text-muted);
  font-weight: 500;
}

.nc-detail-value {
  font-size: 13px;
  color: var(--nc-text);
  font-weight: 500;
}

.nc-detail-value.highlight {
  color: var(--nc-primary);
  font-weight: 600;
}

.nc-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Advanced Filter Panel */
.nc-filter-panel {
  background: var(--nc-surface);
  border: 1px solid var(--nc-border);
  border-radius: var(--nc-radius);
  padding: 20px;
  margin-bottom: 16px;
  animation: slideDown 0.2s ease;
}

.nc-filter-section {
  margin-bottom: 16px;
}

.nc-filter-section:last-child {
  margin-bottom: 0;
}

.nc-filter-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--nc-text-muted);
  margin-bottom: 8px;
}

.nc-filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.nc-filter-option {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--nc-text-secondary);
  background: #f9fafb;
  border: 1px solid var(--nc-border);
  cursor: pointer;
  transition: var(--nc-transition);
}

.nc-filter-option:hover {
  background: var(--nc-primary-light);
  border-color: var(--nc-primary);
}

.nc-filter-option.active {
  background: var(--nc-primary-light);
  border-color: var(--nc-primary);
  color: var(--nc-primary);
}

.nc-filter-actions {
  display: flex;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--nc-border);
}

/* Infinite Scroll Loader */
.nc-loader {
  text-align: center;
  padding: 20px;
  color: var(--nc-text-muted);
  font-size: 13px;
}

.nc-loader-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--nc-border);
  border-top-color: var(--nc-primary);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .nc-main {
    padding: 12px;
  }

  .nc-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .nc-header-title {
    font-size: 17px;
  }

  .nc-card-actions {
    opacity: 1;
  }

  .nc-card-title-row {
    flex-wrap: wrap;
  }

  .nc-drawer {
    width: 100vw;
  }

  .nc-filter-chip {
    padding: 5px 10px;
    font-size: 11px;
  }

  .nc-mobile-filter-fab {
    display: flex !important;
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--nc-primary);
    color: #fff;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(79,70,229,0.4);
    border: none;
    cursor: pointer;
    z-index: 50;
    font-size: 22px;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .nc-main {
    padding: 16px 20px;
  }

  .nc-card-meta {
    gap: 8px;
  }

  .nc-filter-bar {
    flex-wrap: wrap;
  }
}

@media (min-width: 1025px) and (max-width: 1280px) {
  .nc-main {
    padding: 20px 24px;
  }
}

.nc-mobile-filter-fab {
  display: none;
}

/* Bottom Sheet for Mobile Filters */
.nc-bottom-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--nc-surface);
  border-radius: 20px 20px 0 0;
  z-index: 1002;
  max-height: 80vh;
  overflow-y: auto;
  padding: 20px;
  animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 -8px 40px rgba(0,0,0,0.1);
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.nc-bottom-sheet-handle {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: #d1d5db;
  margin: 0 auto 16px;
}

/* Scrollbar styling */
.nc-sidebar::-webkit-scrollbar,
.nc-drawer-body::-webkit-scrollbar {
  width: 4px;
}

.nc-sidebar::-webkit-scrollbar-track,
.nc-drawer-body::-webkit-scrollbar-track {
  background: transparent;
}

.nc-sidebar::-webkit-scrollbar-thumb,
.nc-drawer-body::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 2px;
}

/* Archived/Read opacity */
.nc-card.archived {
  opacity: 0.6;
}

/* Toast notification */
.nc-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #1f2937;
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--nc-radius-sm);
  font-size: 13px;
  font-weight: 500;
  z-index: 9999;
  box-shadow: var(--nc-shadow-lg);
  animation: toastIn 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Checkbox for select-all */
.nc-select-all {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  cursor: pointer;
  font-size: 12px;
  color: var(--nc-text-secondary);
  font-weight: 500;
}

.nc-select-all input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--nc-primary);
}

/* ============================================
   Header Notification Dropdown (Bell)
   Modern floating card with glassmorphism
   ============================================ */

.notif-header-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all var(--nc-transition);
  outline: none;
}
.notif-header-btn:hover {
  background: rgba(79, 70, 229, 0.08);
}
.notif-header-btn:active {
  transform: scale(0.92);
}
.notif-header-btn .notif-bell-icon {
  width: 20px;
  height: 20px;
  color: #64748b;
  transition: color var(--nc-transition);
}
.notif-header-btn:hover .notif-bell-icon {
  color: var(--nc-primary);
}

.notif-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid white;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
  z-index: 1;
  transform-origin: center;
  transition: transform 0.2s ease;
}
.notif-badge.bounce {
  animation: notifBadgeBounce 0.4s ease;
}
@keyframes notifBadgeBounce {
  0%, 100% { transform: scale(1); }
  30% { transform: scale(1.4); }
  60% { transform: scale(0.9); }
  80% { transform: scale(1.1); }
}

.notif-pulse-dot {
  position: absolute;
  top: 0;
  right: 0;
  width: 8px;
  height: 8px;
  z-index: 0;
}
.notif-pulse-dot .notif-pulse-ring {
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.3);
  animation: notifPulse 2s ease-out infinite;
}
.notif-pulse-dot .notif-pulse-core {
  position: absolute;
  inset: 1px;
  border-radius: 50%;
  background: #ef4444;
}
@keyframes notifPulse {
  0% { transform: scale(0.5); opacity: 0.8; }
  100% { transform: scale(2.5); opacity: 0; }
}

.notif-bell-ring {
  animation: notifBellRing 0.5s ease;
}
@keyframes notifBellRing {
  0%, 100% { transform: rotate(0deg); }
  20% { transform: rotate(12deg); }
  40% { transform: rotate(-8deg); }
  60% { transform: rotate(6deg); }
  80% { transform: rotate(-3deg); }
}

.notif-dropdown-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: transparent;
}

.notif-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: -8px;
  z-index: 50;
  width: min(520px, calc(100vw - 24px));
  min-width: 460px;
  max-height: 760px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 16px;
  border: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12), 0 4px 16px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform-origin: top right;
}
@media (max-width: 480px) {
  .notif-dropdown {
    position: fixed;
    top: 60px;
    left: 8px;
    right: 8px;
    width: calc(100vw - 16px);
    min-width: 0;
    max-height: calc(100vh - 80px);
    border-radius: 12px;
  }
}

.notif-dropdown-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--nc-border);
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  flex-shrink: 0;
  gap: 16px;
}
.notif-dropdown-header .notif-title-area {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  flex: 1;
  min-width: 0;
}
.notif-dropdown-header .notif-title-area .notif-title-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--nc-primary), var(--nc-primary-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}
.notif-dropdown-header .notif-title-area .notif-title-icon svg {
  width: 22px;
  height: 22px;
}
.notif-dropdown-header .notif-title-area .notif-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.notif-dropdown-header .notif-title-area h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--nc-text);
  margin: 0;
  line-height: 1.2;
}
.notif-dropdown-header .notif-title-area .notif-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 700;
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}
.notif-dropdown-header .notif-title-area .notif-live-badge.offline {
  background: #fef2f2;
  color: #dc2626;
  border-color: #fecaca;
}
.notif-dropdown-header .notif-title-area .notif-live-badge.reconnecting {
  background: #fffbeb;
  color: #f59e0b;
  border-color: #fde68a;
}
.notif-dropdown-header .notif-title-area .notif-live-badge .notif-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  animation: notifLivePulse 2s ease-in-out infinite;
}
.notif-dropdown-header .notif-title-area .notif-live-badge.reconnecting .notif-live-dot {
  animation: notifSpin 1s linear infinite;
}
.notif-dropdown-header .notif-title-area .notif-live-badge.offline .notif-live-dot {
  animation: none;
}
@keyframes notifLivePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.9); }
}
@keyframes notifSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.notif-dropdown-header .notif-title-area .notif-subtitle {
  font-size: 13px;
  color: var(--nc-text-secondary);
  line-height: 1.4;
  margin: 0;
}
.notif-dropdown-header .notif-title-area .notif-count-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--nc-text-muted);
  background: var(--nc-bg);
  padding: 1px 8px;
  border-radius: 10px;
  align-self: flex-start;
}
.notif-dropdown-header .notif-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.notif-dropdown-header .notif-actions button {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--nc-text-secondary);
  transition: all var(--nc-transition);
}
.notif-dropdown-header .notif-actions button:hover {
  background: var(--nc-bg);
  color: var(--nc-primary);
}
.notif-dropdown-header .notif-actions button:active {
  transform: scale(0.9);
}

.notif-dropdown-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px 0;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}
.notif-dropdown-body::-webkit-scrollbar {
  width: 5px;
}
.notif-dropdown-body::-webkit-scrollbar-track {
  background: transparent;
}
.notif-dropdown-body::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 3px;
}
.notif-dropdown-body::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

.notif-item {
  display: flex;
  gap: 12px;
  padding: 12px 20px;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
  border-left: 3px solid transparent;
}
.notif-item:hover {
  background: #f8f9fc;
}
.notif-item.unread {
  background: #f0f4ff;
  border-left-color: var(--nc-primary);
}
.notif-item.unread:hover {
  background: #e8edff;
}
.notif-item.read {
  opacity: 0.7;
}
.notif-item.read:hover {
  opacity: 1;
}

.notif-item-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}
.notif-item-icon.critical { background: var(--nc-critical-bg); color: var(--nc-critical); }
.notif-item-icon.warning { background: var(--nc-warning-bg); color: var(--nc-warning); }
.notif-item-icon.success { background: #f0fdf4; color: var(--nc-success); }
.notif-item-icon.info { background: #eff6ff; color: var(--nc-info); }
.notif-item-icon.booking { background: #f5f3ff; color: #7c3aed; }
.notif-item-icon.approval { background: #ecfdf5; color: #059669; }
.notif-item-icon.stock { background: #fefce8; color: #ca8a04; }
.notif-item-icon.system { background: #f3f4f6; color: #6b7280; }

.notif-item-content {
  flex: 1;
  min-width: 0;
}
.notif-item-content .notif-item-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--nc-text);
  margin: 0 0 2px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.notif-item-content .notif-item-desc {
  font-size: 12px;
  color: var(--nc-text-secondary);
  margin: 0 0 4px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.notif-item-content .notif-item-time {
  font-size: 11px;
  color: var(--nc-text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.notif-item-status {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  padding-left: 8px;
}
.notif-item-status .notif-status-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  white-space: nowrap;
}
.notif-status-badge.unread { background: #dbeafe; color: #1d4ed8; }
.notif-status-badge.read { background: #f3f4f6; color: #6b7280; }
.notif-status-badge.important { background: #fee2e2; color: #dc2626; }

.notif-item-actions {
  display: flex;
  gap: 2px;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.notif-item:hover .notif-item-actions {
  opacity: 1;
}
.notif-item-actions button {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--nc-text-muted);
  transition: all 0.15s ease;
  font-size: 12px;
}
.notif-item-actions button:hover {
  background: #e5e7eb;
  color: var(--nc-text);
}

.notif-item-inner {
  display: flex;
  width: 100%;
}

.notif-item-divider {
  height: 1px;
  background: var(--nc-border);
  margin: 0 20px;
}

/* ============================================
   Notification cards (real-time dropdown list)
   Each card gets a type-aware "tone" class
   (.notif-tone-*) that only sets CSS variables.
   Components below consume those variables so a
   notification family keeps one consistent color
   while the whole list stays cohesive.
   ============================================ */

/* Defaults shared by every tone (slate fallback) */
[class*="notif-tone-"] {
  --nv: #475569;
  --nv-soft: #64748b;
  --nv-dark: #334155;
  --nv-bg: #f8fafc;
  --nv-bg2: #f1f5f9;
  --nv-border: #e2e8f0;
  --nv-border2: #94a3b8;
  --nv-glow: rgba(100, 116, 139, 0.4);
  --nv-ring: #ffffff;
  --nv-rgb: 100, 116, 139;
}
.dark [class*="notif-tone-"] {
  --nv: #94a3b8;
  --nv-soft: #64748b;
  --nv-dark: #cbd5e1;
  --nv-bg: rgba(100, 116, 139, 0.15);
  --nv-bg2: rgba(100, 116, 139, 0.24);
  --nv-border: rgba(100, 116, 139, 0.3);
  --nv-border2: rgba(148, 163, 184, 0.5);
  --nv-glow: rgba(148, 163, 184, 0.45);
  --nv-ring: #1e293b;
}

.notif-tone-emerald { --nv: #059669; --nv-soft: #10b981; --nv-dark: #047857; --nv-bg: #ecfdf5; --nv-bg2: #d1fae5; --nv-border: #a7f3d0; --nv-border2: #6ee7b7; --nv-glow: rgba(16, 185, 129, 0.45); --nv-rgb: 16, 185, 129; }
.notif-tone-blue   { --nv: #2563eb; --nv-soft: #3b82f6; --nv-dark: #1d4ed8; --nv-bg: #eff6ff; --nv-bg2: #dbeafe; --nv-border: #bfdbfe; --nv-border2: #93c5fd; --nv-glow: rgba(59, 130, 246, 0.45); --nv-rgb: 59, 130, 246; }
.notif-tone-amber  { --nv: #d97706; --nv-soft: #f59e0b; --nv-dark: #b45309; --nv-bg: #fffbeb; --nv-bg2: #fef3c7; --nv-border: #fde68a; --nv-border2: #fcd34d; --nv-glow: rgba(245, 158, 11, 0.45); --nv-rgb: 245, 158, 11; }
.notif-tone-red    { --nv: #dc2626; --nv-soft: #ef4444; --nv-dark: #b91c1c; --nv-bg: #fef2f2; --nv-bg2: #fee2e2; --nv-border: #fecaca; --nv-border2: #fca5a5; --nv-glow: rgba(239, 68, 68, 0.45); --nv-rgb: 239, 68, 68; }
.notif-tone-violet { --nv: #7c3aed; --nv-soft: #8b5cf6; --nv-dark: #6d28d9; --nv-bg: #f5f3ff; --nv-bg2: #ede9fe; --nv-border: #ddd6fe; --nv-border2: #c4b5fd; --nv-glow: rgba(139, 92, 246, 0.45); --nv-rgb: 139, 92, 246; }
.notif-tone-cyan   { --nv: #0891b2; --nv-soft: #06b6d4; --nv-dark: #0e7490; --nv-bg: #ecfeff; --nv-bg2: #cffafe; --nv-border: #a5f3fc; --nv-border2: #67e8f9; --nv-glow: rgba(6, 182, 212, 0.45); --nv-rgb: 6, 182, 212; }
.notif-tone-sky    { --nv: #0284c7; --nv-soft: #0ea5e9; --nv-dark: #0369a1; --nv-bg: #f0f9ff; --nv-bg2: #e0f2fe; --nv-border: #bae6fd; --nv-border2: #7dd3fc; --nv-glow: rgba(14, 165, 233, 0.45); --nv-rgb: 14, 165, 233; }
.notif-tone-green  { --nv: #16a34a; --nv-soft: #22c55e; --nv-dark: #15803d; --nv-bg: #f0fdf4; --nv-bg2: #dcfce7; --nv-border: #bbf7d0; --nv-border2: #86efac; --nv-glow: rgba(34, 197, 94, 0.45); --nv-rgb: 34, 197, 94; }
.notif-tone-orange { --nv: #ea580c; --nv-soft: #f97316; --nv-dark: #c2410c; --nv-bg: #fff7ed; --nv-bg2: #ffedd5; --nv-border: #fed7aa; --nv-border2: #fdba74; --nv-glow: rgba(249, 115, 22, 0.45); --nv-rgb: 249, 115, 22; }
.notif-tone-slate  { --nv: #475569; --nv-soft: #64748b; --nv-dark: #334155; --nv-bg: #f8fafc; --nv-bg2: #f1f5f9; --nv-border: #e2e8f0; --nv-border2: #94a3b8; --nv-glow: rgba(100, 116, 139, 0.4); --nv-ring: #ffffff; --nv-rgb: 100, 116, 139; }

/* Dark-mode tones */
.dark .notif-tone-emerald { --nv: #34d399; --nv-bg: rgba(16, 185, 129, 0.12); --nv-bg2: rgba(16, 185, 129, 0.2); --nv-border: rgba(16, 185, 129, 0.3); --nv-border2: rgba(110, 231, 183, 0.55); --nv-glow: rgba(52, 211, 153, 0.5); }
.dark .notif-tone-blue   { --nv: #60a5fa; --nv-bg: rgba(59, 130, 246, 0.12); --nv-bg2: rgba(59, 130, 246, 0.22); --nv-border: rgba(96, 165, 250, 0.3); --nv-border2: rgba(147, 197, 253, 0.55); --nv-glow: rgba(96, 165, 250, 0.5); }
.dark .notif-tone-amber  { --nv: #fbbf24; --nv-bg: rgba(245, 158, 11, 0.12); --nv-bg2: rgba(245, 158, 11, 0.22); --nv-border: rgba(252, 211, 77, 0.3); --nv-border2: rgba(253, 230, 138, 0.55); --nv-glow: rgba(251, 191, 36, 0.5); }
.dark .notif-tone-red    { --nv: #f87171; --nv-bg: rgba(239, 68, 68, 0.12); --nv-bg2: rgba(239, 68, 68, 0.22); --nv-border: rgba(248, 113, 113, 0.3); --nv-border2: rgba(252, 165, 165, 0.55); --nv-glow: rgba(248, 113, 113, 0.5); }
.dark .notif-tone-violet { --nv: #a78bfa; --nv-bg: rgba(139, 92, 246, 0.15); --nv-bg2: rgba(139, 92, 246, 0.25); --nv-border: rgba(167, 139, 250, 0.32); --nv-border2: rgba(196, 181, 253, 0.55); --nv-glow: rgba(167, 139, 250, 0.5); }
.dark .notif-tone-cyan   { --nv: #22d3ee; --nv-bg: rgba(6, 182, 212, 0.12); --nv-bg2: rgba(6, 182, 212, 0.22); --nv-border: rgba(34, 211, 238, 0.3); --nv-border2: rgba(103, 232, 249, 0.55); --nv-glow: rgba(34, 211, 238, 0.5); }
.dark .notif-tone-sky    { --nv: #38bdf8; --nv-bg: rgba(14, 165, 233, 0.12); --nv-bg2: rgba(14, 165, 233, 0.22); --nv-border: rgba(56, 189, 248, 0.3); --nv-border2: rgba(125, 211, 252, 0.55); --nv-glow: rgba(56, 189, 248, 0.5); }
.dark .notif-tone-green  { --nv: #4ade80; --nv-bg: rgba(34, 197, 94, 0.12); --nv-bg2: rgba(34, 197, 94, 0.22); --nv-border: rgba(74, 222, 128, 0.3); --nv-border2: rgba(134, 239, 172, 0.55); --nv-glow: rgba(74, 222, 128, 0.5); }
.dark .notif-tone-orange { --nv: #fb923c; --nv-bg: rgba(249, 115, 22, 0.12); --nv-bg2: rgba(249, 115, 22, 0.22); --nv-border: rgba(251, 146, 60, 0.3); --nv-border2: rgba(253, 186, 116, 0.55); --nv-glow: rgba(251, 146, 60, 0.5); }

/* Card shell — neutral read state, type-aware unread tint */
.notif-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0 12px 10px;
  padding: 13px 14px;
  border-radius: 14px;
  border: 1px solid #eef0f4;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.05);
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.2s ease, border-color 0.2s ease;
}
.dark .notif-card {
  background: rgba(30, 41, 59, 0.45);
  border-color: rgba(51, 65, 85, 0.7);
  box-shadow: none;
}
.notif-card:hover {
  transform: translateY(-1px);
  background: #f8fafc;
  border-color: #e2e8f0;
  box-shadow: 0 8px 20px -6px rgba(15, 23, 42, 0.1), 0 2px 6px -2px rgba(15, 23, 42, 0.06);
}
.dark .notif-card:hover {
  background: rgba(51, 65, 85, 0.5);
  border-color: rgba(71, 85, 105, 0.85);
  box-shadow: 0 8px 20px -6px rgba(0, 0, 0, 0.4), 0 2px 6px -2px rgba(0, 0, 0, 0.25);
}
.notif-card:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.55), 0 8px 20px -6px rgba(15, 23, 42, 0.1);
}
.dark .notif-card:focus-visible {
  box-shadow: 0 0 0 2px rgba(129, 140, 248, 0.6), 0 8px 20px -6px rgba(0, 0, 0, 0.4);
}
.notif-card.is-unread {
  background: var(--nv-bg);
  border-color: var(--nv-border);
}
.notif-card.is-unread:hover {
  background: var(--nv-bg2);
  border-color: var(--nv-border2);
}

/* Category icon */
.notif-card-icon {
  width: 42px;
  height: 42px;
  flex: none;
  margin-top: 1px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--nv-bg);
  background-image: linear-gradient(145deg, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0) 55%);
  color: var(--nv);
  border: 1px solid var(--nv-border);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  position: relative;
  overflow: hidden;
}
.dark .notif-card-icon {
  background-image: linear-gradient(145deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 55%);
}
.notif-card-icon svg {
  width: 18px;
  height: 18px;
}
.notif-card-icon.is-lg {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  box-shadow: 0 2px 6px -1px rgba(15, 23, 42, 0.08);
}
.notif-card-icon.is-lg svg {
  width: 22px;
  height: 22px;
}

/* Body */
.notif-card-body {
  flex: 1;
  min-width: 0;
}
.notif-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.notif-card-title {
  flex: 1;
  min-width: 0;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  color: #1a1d23;
  transition: color 0.15s ease;
}
.dark .notif-card-title {
  color: #e2e8f0;
}
.notif-card-title.is-unread {
  font-weight: 700;
  color: var(--nv);
}

/* Badge clusters (status + priority) */
.notif-card-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
  max-width: 60%;
  min-width: 0;
}
.notif-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.02em;
  white-space: nowrap;
  background: var(--nv-bg);
  color: var(--nv);
  border: 1px solid var(--nv-border);
}
.notif-priority-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.5;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  color: #ffffff;
}
.notif-priority-critical { background: #dc2626; box-shadow: 0 1px 3px rgba(220, 38, 38, 0.3); }
.notif-priority-high     { background: #ea580c; box-shadow: 0 1px 3px rgba(234, 88, 12, 0.3); }
.notif-priority-medium   { background: #d97706; box-shadow: 0 1px 3px rgba(217, 119, 6, 0.3); }
.notif-priority-low      { background: #64748b; box-shadow: 0 1px 3px rgba(100, 116, 139, 0.3); }
.dark .notif-priority-critical { background: #ef4444; }
.dark .notif-priority-high     { background: #f97316; }
.dark .notif-priority-medium   { background: #f59e0b; }
.dark .notif-priority-low      { background: #475569; }

/* Description */
.notif-card-desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 5px;
  font-size: 12px;
  line-height: 1.5;
  color: #64748b;
  transition: color 0.15s ease;
}
.dark .notif-card-desc {
  color: #94a3b8;
}
.notif-card-desc.is-unread {
  color: #475569;
}
.dark .notif-card-desc.is-unread {
  color: #cbd5e1;
}

/* Metadata row (type / customer / booking / time) */
.notif-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(226, 232, 240, 0.8);
  font-size: 11px;
  font-weight: 500;
  color: #94a3b8;
  min-width: 0;
}
.dark .notif-meta {
  border-top-color: rgba(51, 65, 85, 0.6);
  color: #64748b;
}
.notif-meta-chip {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  border-radius: 9999px;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
  background: var(--nv-bg);
  color: var(--nv);
  border: 1px solid var(--nv-border);
}
.notif-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  font-weight: 500;
  color: #475569;
}
button.notif-meta-item.notif-customer-link,
button.notif-customer-link {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  cursor: pointer;
  font: inherit;
  color: inherit;
  max-width: 100%;
}
button.notif-meta-item.notif-customer-link:hover,
button.notif-customer-link:hover {
  color: #4f46e5;
}
button.notif-meta-item.notif-customer-link:hover .notif-meta-text,
button.notif-customer-link:hover {
  text-decoration: underline;
}
.notif-detail-stat-value.notif-customer-link {
  color: #1e293b;
  font-weight: 600;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
}
.notif-detail-stat-value.notif-customer-link:hover {
  color: #4f46e5;
  text-decoration: underline;
}
.dark .notif-meta-item {
  color: #94a3b8;
}
.notif-meta-item svg {
  width: 12px;
  height: 12px;
  flex: none;
  opacity: 0.65;
}
.notif-meta-text {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: inherit;
}
.notif-meta-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #334155;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dark .notif-meta-mono {
  color: #cbd5e1;
}
.notif-meta-time {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  color: #94a3b8;
  white-space: nowrap;
}
.dark .notif-meta-time {
  color: #64748b;
}
.notif-meta-time svg {
  width: 12px;
  height: 12px;
  opacity: 0.7;
}

/* Quick actions */
.notif-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(226, 232, 240, 0.8);
}
.dark .notif-actions {
  border-top-color: rgba(51, 65, 85, 0.6);
}
.notif-action-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.notif-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 6px 10px;
  border-radius: 9px;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.2;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}
.notif-action-btn:active {
  transform: translateY(1px) scale(0.98);
}
.notif-action-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.4);
}
.notif-action-btn svg {
  width: 13px;
  height: 13px;
  flex: none;
}
.notif-action-btn.is-review {
  background: #7c3aed;
  color: #ffffff;
}
.notif-action-btn.is-review:hover {
  background: #6d28d9;
  box-shadow: 0 3px 8px -2px rgba(124, 58, 237, 0.45);
}
.notif-action-btn.is-review:active {
  background: #5b21b6;
}
.notif-action-btn.is-customer {
  background: #e0f2fe;
  color: #0369a1;
  border-color: #bae6fd;
}
.notif-action-btn.is-customer:hover {
  background: #bae6fd;
}
.notif-action-btn.is-booking {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}
.notif-action-btn.is-booking:hover {
  background: #bfdbfe;
}
.notif-action-btn.is-detail {
  background: transparent;
  color: var(--nv);
}
.notif-action-btn.is-detail:hover {
  background: var(--nv-bg);
}
.notif-action-btn.is-detail:focus-visible {
  box-shadow: 0 0 0 2px var(--nv-border2);
}
.dark .notif-action-btn.is-review { background: #8b5cf6; color: #ffffff; }
.dark .notif-action-btn.is-review:hover { background: #7c3aed; }
.dark .notif-action-btn.is-customer { background: rgba(14, 165, 233, 0.14); color: #7dd3fc; border-color: rgba(14, 165, 233, 0.32); }
.dark .notif-action-btn.is-customer:hover { background: rgba(14, 165, 233, 0.24); }
.dark .notif-action-btn.is-booking { background: rgba(59, 130, 246, 0.14); color: #93c5fd; border-color: rgba(59, 130, 246, 0.32); }
.dark .notif-action-btn.is-booking:hover { background: rgba(59, 130, 246, 0.24); }
.dark .notif-action-btn.is-detail { color: var(--nv); }
.dark .notif-action-btn.is-detail:hover { background: var(--nv-bg); }

/* Unread indicator — type-aware dot with subtle glow + ring */
.notif-unread-dot {
  position: absolute;
  top: 14px;
  left: -5px;
  width: 9px;
  height: 9px;
  border-radius: 9999px;
  background: var(--nv-soft);
  box-shadow: 0 0 0 2px var(--nv-ring), 0 0 7px 1px var(--nv-glow);
  z-index: 1;
}

/* New notification — subtle fade/slide + soft highlight + dot pulse */
.notif-item-new {
  animation: notifItemNew 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}
.notif-item-new::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--nv-bg2);
  opacity: 0;
  pointer-events: none;
  animation: notifHighlight 0.5s ease-out forwards;
}
.notif-item-new .notif-unread-dot {
  animation: notifDotPulse 0.6s ease-out;
}
@keyframes notifItemNew {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@keyframes notifHighlight {
  0% { opacity: 1; }
  70% { opacity: 0.45; }
  100% { opacity: 0; }
}
@keyframes notifDotPulse {
  0%, 100% { box-shadow: 0 0 0 2px var(--nv-ring), 0 0 7px 1px var(--nv-glow); }
  50% { box-shadow: 0 0 0 5px var(--nv-ring), 0 0 12px 3px var(--nv-glow); }
}
@media (prefers-reduced-motion: reduce) {
  .notif-item-new,
  .notif-item-new::before,
  .notif-item-new .notif-unread-dot {
    animation: none;
  }
  .notif-card {
    transition: background-color 0.2s ease, border-color 0.2s ease;
  }
  .notif-card:hover {
    transform: none;
  }
}

/* Hide scrollbars on horizontally-scrolling tab rows */
.no-scrollbar {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.no-scrollbar::-webkit-scrollbar {
  display: none;
}

.notif-dropdown-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--nc-border);
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  flex-shrink: 0;
}
.notif-dropdown-footer .notif-footer-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, var(--nc-primary), var(--nc-primary-dark));
  color: white;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--nc-transition);
}
.notif-dropdown-footer .notif-footer-btn:hover {
  box-shadow: 0 4px 16px rgba(79, 70, 229, 0.35);
  transform: translateY(-1px);
}
.notif-dropdown-footer .notif-footer-btn:active {
  transform: translateY(0);
}

.notif-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
}
.notif-empty-state svg {
  width: 64px;
  height: 64px;
  color: #d1d5db;
  margin-bottom: 16px;
}
.notif-empty-state h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--nc-text);
  margin: 0 0 4px;
}
.notif-empty-state p {
  font-size: 13px;
  color: var(--nc-text-muted);
  margin: 0;
}

.notif-loading-item {
  display: flex;
  gap: 12px;
  padding: 12px 20px;
  animation: notifShimmer 1.5s ease-in-out infinite;
}
.notif-loading-item .notif-skeleton-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #e5e7eb;
  flex-shrink: 0;
}
.notif-loading-item .notif-skeleton-lines {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.notif-loading-item .notif-skeleton-lines div {
  height: 12px;
  border-radius: 4px;
  background: #e5e7eb;
}
.notif-loading-item .notif-skeleton-lines div:last-child {
  width: 60%;
}
@keyframes notifShimmer {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* Dropdown open animation */
.notif-dropdown-enter {
  animation: notifDropdownEnter 0.25s ease;
}
@keyframes notifDropdownEnter {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(-8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Mark all read button text */
.notif-mark-all-btn {
  font-size: 12px;
  font-weight: 600;
  color: var(--nc-primary);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 6px;
  transition: all var(--nc-transition);
  display: flex;
  align-items: center;
  gap: 4px;
}
.notif-mark-all-btn:hover {
  background: var(--nc-primary-light);
}
.notif-mark-all-btn:active {
  transform: scale(0.96);
}

/* Online indicator in notifications */
.notif-live-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--nc-text-muted);
  margin-top: 2px;
}
.notif-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--nc-success);
  display: inline-block;
}
.notif-live-dot.offline {
  background: var(--nc-text-muted);
}

/* ============================================
   Dark Mode Overrides for Header Dropdown
   ============================================ */
.dark .notif-dropdown {
  background: rgba(30, 41, 59, 0.98);
  border-color: rgba(51, 65, 85, 0.8);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}
.dark .notif-dropdown-header {
  background: rgba(30, 41, 59, 0.9);
  border-bottom-color: rgba(51, 65, 85, 0.6);
}
.dark .notif-dropdown-header .notif-title-area h3 {
  color: #f1f5f9;
}
.dark .notif-dropdown-header .notif-title-area .notif-count-label {
  background: rgba(51, 65, 85, 0.5);
  color: #94a3b8;
}
.dark .notif-dropdown-header .notif-actions button {
  color: #94a3b8;
}
.dark .notif-dropdown-header .notif-actions button:hover {
  background: rgba(51, 65, 85, 0.5);
  color: var(--nc-primary);
}
.dark .notif-item:hover {
  background: rgba(51, 65, 85, 0.4);
}
.dark .notif-item.unread {
  background: rgba(79, 70, 229, 0.12);
}
.dark .notif-item.unread:hover {
  background: rgba(79, 70, 229, 0.18);
}
.dark .notif-item-content .notif-item-title {
  color: #f1f5f9;
}
.dark .notif-item-content .notif-item-desc {
  color: #94a3b8;
}
.dark .notif-item-content .notif-item-time {
  color: #64748b;
}
.dark .notif-item-divider {
  background: rgba(51, 65, 85, 0.6);
}
.dark .notif-dropdown-footer {
  background: rgba(30, 41, 59, 0.9);
  border-top-color: rgba(51, 65, 85, 0.6);
}
.dark .notif-empty-state svg {
  color: #475569;
}
.dark .notif-empty-state h4 {
  color: #e2e8f0;
}
.dark .notif-empty-state p {
  color: #64748b;
}
.dark .notif-loading-item .notif-skeleton-icon {
  background: #334155;
}
.dark .notif-loading-item .notif-skeleton-lines div {
  background: #334155;
}
.dark .notif-badge {
  border-color: #1e293b;
}
.dark .notif-item-actions button:hover {
  background: #334155;
  color: #e2e8f0;
}
.dark .notif-header-btn .notif-bell-icon {
  color: #94a3b8;
}
.dark .notif-header-btn:hover {
  background: rgba(99, 102, 241, 0.12);
}
.dark .notif-header-btn:hover .notif-bell-icon {
  color: var(--nc-primary);
}
.dark .notif-item-icon.critical { background: rgba(239, 68, 68, 0.15); }
.dark .notif-item-icon.warning { background: rgba(245, 158, 11, 0.15); }
.dark .notif-item-icon.success { background: rgba(34, 197, 94, 0.15); }
.dark .notif-item-icon.info { background: rgba(59, 130, 246, 0.15); }
.dark .notif-item-icon.booking { background: rgba(124, 58, 237, 0.15); }
.dark .notif-item-icon.approval { background: rgba(5, 150, 105, 0.15); }
.dark .notif-item-icon.stock { background: rgba(202, 138, 4, 0.15); }
.dark .notif-item-icon.system { background: rgba(107, 114, 128, 0.2); }
.dark .notif-status-badge.unread { background: rgba(59, 130, 246, 0.2); color: #93c5fd; }
.dark .notif-status-badge.read { background: rgba(71, 85, 105, 0.5); color: #94a3b8; }
.dark .notif-dropdown-body::-webkit-scrollbar-thumb {
  background: #475569;
}
.dark .notif-dropdown-body::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}

/* ============================================
   Notification Center - Page Layout
   (for mainListHeaderNotification.html)
   ============================================ */
.nc-page {
  padding: 20px 24px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.nc-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.nc-page-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nc-page-header-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--nc-primary-light);
  border-radius: var(--nc-radius);
  color: var(--nc-primary);
  flex-shrink: 0;
}

.nc-page-header-icon svg {
  width: 22px;
  height: 22px;
}

.nc-page-header-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--nc-text);
  letter-spacing: -0.01em;
  margin: 0;
}

.nc-page-header-status {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--nc-text-muted);
  margin-top: 2px;
}

.nc-status-sep {
  color: var(--nc-border);
}

.nc-page-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nc-page-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--nc-radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--nc-transition);
  border: 1px solid transparent;
  white-space: nowrap;
}

.nc-page-btn-primary {
  background: var(--nc-primary);
  color: #fff;
  border-color: var(--nc-primary);
}

.nc-page-btn-primary:hover {
  background: var(--nc-primary-dark);
}

.nc-page-btn-secondary {
  background: var(--nc-surface);
  color: var(--nc-text-secondary);
  border-color: var(--nc-border);
}

.nc-page-btn-secondary:hover {
  border-color: var(--nc-primary);
  color: var(--nc-primary);
  background: var(--nc-primary-light);
}

/* Status Dot */
.nc-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--nc-success);
  display: inline-block;
  flex-shrink: 0;
}

.nc-status-dot.offline {
  background: var(--nc-critical);
}

.nc-status-sync {
  color: var(--nc-text-muted);
}

/* Stats Grid */
.nc-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.nc-stat-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--nc-surface);
  border-radius: var(--nc-radius);
  border: 1px solid var(--nc-border);
  cursor: pointer;
  transition: var(--nc-transition);
  box-shadow: var(--nc-shadow);
}

.nc-stat-card:hover {
  box-shadow: var(--nc-shadow-lg);
  transform: translateY(-1px);
}

.nc-stat-card.nc-stat-critical { border-left: 3px solid var(--nc-critical); }
.nc-stat-card.nc-stat-warning { border-left: 3px solid var(--nc-warning); }
.nc-stat-card.nc-stat-success { border-left: 3px solid var(--nc-success); }
.nc-stat-card.nc-stat-approval { border-left: 3px solid #7c3aed; }
.nc-stat-card.nc-stat-pending { border-left: 3px solid #f59e0b; }
.nc-stat-card.nc-stat-total { border-left: 3px solid var(--nc-primary); }
.nc-stat-card.is-active {
  box-shadow: var(--nc-shadow-lg);
  outline: 2px solid var(--nc-primary);
  outline-offset: 1px;
}
.nc-stat-card.nc-stat-pending.is-active {
  outline-color: #f59e0b;
}
.nc-stat-card.nc-stat-approval.is-active {
  outline-color: #7c3aed;
}

.nc-stat-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--nc-radius-sm);
  flex-shrink: 0;
}

.nc-stat-critical .nc-stat-icon { background: var(--nc-critical-bg); color: var(--nc-critical); }
.nc-stat-warning .nc-stat-icon { background: var(--nc-warning-bg); color: var(--nc-warning); }
.nc-stat-success .nc-stat-icon { background: var(--nc-success-bg); color: var(--nc-success); }
.nc-stat-approval .nc-stat-icon { background: #f5f3ff; color: #7c3aed; }
.nc-stat-pending .nc-stat-icon { background: #fffbeb; color: #d97706; }
.nc-stat-total .nc-stat-icon { background: var(--nc-primary-light); color: var(--nc-primary); }

.nc-stat-icon svg {
  width: 18px;
  height: 18px;
}

.nc-stat-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.nc-stat-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--nc-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nc-stat-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--nc-text);
  line-height: 1.2;
}

/* Search Box */
.nc-search-box {
  position: relative;
  margin-bottom: 16px;
}

.nc-search-box-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--nc-text-muted);
  pointer-events: none;
}

.nc-search-box-input {
  width: 100%;
  padding: 10px 36px 10px 38px;
  background: var(--nc-surface);
  border: 1px solid var(--nc-border);
  border-radius: var(--nc-radius-sm);
  font-size: 13px;
  color: var(--nc-text);
  outline: none;
  transition: var(--nc-transition);
  box-sizing: border-box;
}

.nc-search-box-input:focus {
  border-color: var(--nc-primary);
  box-shadow: 0 0 0 3px var(--nc-primary-light);
}

.nc-search-box-input::placeholder {
  color: var(--nc-text-muted);
}

.nc-search-box-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  border: none;
  background: transparent;
  color: var(--nc-text-muted);
  cursor: pointer;
  transition: var(--nc-transition);
}

.nc-search-box-clear:hover {
  background: var(--nc-bg);
  color: var(--nc-text);
}

/* Date Range Filter */
.nc-date-range {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.nc-date-range-field {
  position: relative;
  flex: 1;
  min-width: 140px;
  max-width: 200px;
}

.nc-date-range-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--nc-text-muted);
  pointer-events: none;
}

.nc-date-range-input {
  width: 100%;
  padding: 8px 10px 8px 32px;
  background: var(--nc-surface);
  border: 1px solid var(--nc-border);
  border-radius: var(--nc-radius-sm);
  font-size: 12px;
  color: var(--nc-text);
  outline: none;
  transition: var(--nc-transition);
  box-sizing: border-box;
  cursor: pointer;
}

.nc-date-range-input:focus {
  border-color: var(--nc-primary);
  box-shadow: 0 0 0 3px var(--nc-primary-light);
}

.nc-date-range-input::placeholder {
  color: var(--nc-text-muted);
  font-size: 11px;
}

.nc-date-range-sep {
  font-size: 11px;
  color: var(--nc-text-muted);
  flex-shrink: 0;
}

.nc-date-range-clear {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  background: transparent;
  border: 1px solid var(--nc-border);
  color: var(--nc-text-muted);
  cursor: pointer;
  transition: var(--nc-transition);
  flex-shrink: 0;
}

.nc-date-range-clear:hover {
  background: var(--nc-bg);
  color: var(--nc-critical);
  border-color: var(--nc-critical);
}

.dark .nc-date-range-input { background: #1e293b; border-color: #334155; color: #e2e8f0; }
.dark .nc-date-range-input:focus { border-color: var(--nc-primary); }

/* Filter Tabs */
.nc-filter-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}

.nc-filter-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--nc-text-secondary);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: var(--nc-transition);
  white-space: nowrap;
  flex-shrink: 0;
  position: relative;
}

.nc-filter-tab:hover {
  background: var(--nc-primary-light);
  color: var(--nc-primary);
}

.nc-filter-tab.active {
  background: var(--nc-primary-light);
  color: var(--nc-primary);
  font-weight: 600;
}

.nc-filter-tab-icon {
  display: flex;
  align-items: center;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.nc-filter-tab-icon svg {
  width: 16px;
  height: 16px;
}

.nc-filter-tab-label {
  line-height: 1;
}

.nc-filter-tab-count {
  font-size: 10px;
  font-weight: 600;
  background: var(--nc-border);
  color: var(--nc-text-secondary);
  padding: 1px 6px;
  border-radius: 8px;
  min-width: 16px;
  text-align: center;
}

.nc-filter-tab.active .nc-filter-tab-count {
  background: var(--nc-primary);
  color: #fff;
}

.nc-filter-tab-underline {
  position: absolute;
  bottom: -4px;
  left: 14px;
  right: 14px;
  height: 2px;
  background: var(--nc-primary);
  border-radius: 1px;
}

/* Notification List */
.nc-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: calc(100vh - 380px);
  overflow-y: auto;
  padding-right: 4px;
}

.nc-list-more {
  display: flex;
  justify-content: center;
  padding: 16px 0;
}

.nc-list-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 0;
}

/* Skeleton Loading */
.nc-skeleton-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nc-skeleton-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--nc-surface);
  border-radius: var(--nc-radius);
  border: 1px solid var(--nc-border);
}

.nc-skeleton-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--nc-border);
  flex-shrink: 0;
  animation: shimmer 1.5s infinite;
}

.nc-skeleton-lines {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nc-skeleton-line {
  height: 10px;
  border-radius: 4px;
  background: var(--nc-border);
  animation: shimmer 1.5s infinite;
}

.nc-skeleton-line.w-60 { width: 60%; }
.nc-skeleton-line.w-80 { width: 80%; }
.nc-skeleton-line.w-40 { width: 40%; }

@keyframes shimmer {
  0% { opacity: 0.6; }
  50% { opacity: 1; }
  100% { opacity: 0.6; }
}

/* Card Inner Elements */
.nc-card-inner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
}

.nc-card-check {
  display: flex;
  align-items: center;
  padding-top: 2px;
  flex-shrink: 0;
}

.nc-card-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--nc-primary);
  cursor: pointer;
}

.nc-card-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--nc-radius-sm);
  flex-shrink: 0;
}

.nc-card-icon.critical { background: var(--nc-critical-bg); color: var(--nc-critical); }
.nc-card-icon.warning { background: var(--nc-warning-bg); color: var(--nc-warning); }
.nc-card-icon.success { background: var(--nc-success-bg); color: var(--nc-success); }
.nc-card-icon.info { background: var(--nc-info-bg); color: var(--nc-info); }
.nc-card-icon.booking { background: #f3e8ff; color: #7c3aed; }
.nc-card-icon.approval { background: #ecfdf5; color: #059669; }
.nc-card-icon.customer { background: #e0f2fe; color: #0284c7; }
.nc-card-icon.system { background: var(--nc-bg); color: var(--nc-text-muted); }

.nc-card-icon svg {
  width: 18px;
  height: 18px;
}

.nc-card-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.nc-card-badge.critical { background: var(--nc-critical-bg); color: var(--nc-critical); }
.nc-card-badge.warning { background: var(--nc-warning-bg); color: var(--nc-warning); }
/* Approved status → GREEN */
.nc-card-badge.success { background: #ecfdf5; color: #059669; }
.nc-card-badge.info { background: var(--nc-info-bg); color: var(--nc-info); }
.nc-card-badge.booking { background: #f3e8ff; color: #7c3aed; }
/* Pending approval → RED */
.nc-card-badge.approval { background: #fef2f2; color: #dc2626; }
.nc-card-badge.customer { background: #e0f2fe; color: #0284c7; }
.nc-card-badge.system { background: var(--nc-bg); color: var(--nc-text-muted); }

.nc-card-pin {
  font-size: 12px;
  flex-shrink: 0;
}

.nc-card-desc {
  font-size: 12px;
  color: var(--nc-text-secondary);
  line-height: 1.4;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.nc-card-status {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.nc-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
}

.nc-status-pill.unread {
  background: var(--nc-primary-light);
  color: var(--nc-primary);
}

.nc-status-pill.read {
  background: #f1f5f9;
  color: #64748b;
}

.nc-status-pill.pending {
  background: #fffbeb;
  color: #d97706;
}

.nc-status-pill.approved {
  background: #ecfdf5;
  color: #059669;
}

.nc-status-pill.rejected {
  background: #fef2f2;
  color: #dc2626;
}

/* Bulk Actions Container */
.nc-bulk-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Drawer Inner Elements */
.nc-drawer-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.nc-drawer-subtitle {
  font-size: 11px;
  color: var(--nc-text-muted);
  margin-top: 2px;
}

.nc-drawer-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 200px;
  color: var(--nc-text-muted);
  font-size: 13px;
}

.nc-drawer-content {
  padding-bottom: 80px;
}

.nc-drawer-section {
  margin-bottom: 20px;
}

.nc-drawer-section-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--nc-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.nc-drawer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.nc-drawer-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--nc-radius-sm);
  font-size: 12px;
  font-weight: 500;
  background: var(--nc-bg);
  border: 1px solid var(--nc-border);
  color: var(--nc-text-secondary);
  cursor: pointer;
  transition: var(--nc-transition);
}

.nc-drawer-action-btn:hover {
  background: var(--nc-primary-light);
  border-color: var(--nc-primary);
  color: var(--nc-primary);
}

.nc-drawer-action-btn-primary {
  background: var(--nc-primary);
  border-color: var(--nc-primary);
  color: #fff;
}

.nc-drawer-action-btn-primary:hover {
  background: var(--nc-primary-dark);
  color: #fff;
}

/* Dark Mode Overrides */
.dark .nc-page { background: transparent; }
.dark .nc-page-header-title { color: #e2e8f0; }
.dark .nc-search-box-input { background: #1e293b; border-color: #334155; color: #e2e8f0; }
.dark .nc-search-box-input:focus { border-color: var(--nc-primary); }
.dark .nc-stat-card { background: #1e293b; border-color: #334155; }
.dark .nc-stat-value { color: #e2e8f0; }
.dark .nc-filter-tab.active { background: rgba(79, 70, 229, 0.15); }
.dark .nc-filter-tab:hover { background: rgba(79, 70, 229, 0.1); }
.dark .nc-skeleton-item { background: #1e293b; border-color: #334155; }
.dark .nc-skeleton-avatar { background: #334155; }
.dark .nc-skeleton-line { background: #334155; }
.dark .nc-card-icon.system { background: #1e293b; }
.dark .nc-card-badge.system { background: #1e293b; }
/* Dark mode: Pending → readable red, Approved → readable green */
.dark .nc-card-badge.approval,
.dark .nc-card-priority.approval { background: rgba(220, 38, 38, 0.18); color: #f87171; }
.dark .nc-card-badge.success,
.dark .nc-card-priority.success { background: rgba(5, 150, 105, 0.18); color: #34d399; }
.dark .nc-card-desc { color: #94a3b8; }
.dark .nc-status-pill.read { background: #1e293b; }
.dark .nc-card-pin { opacity: 0.8; }
.dark .nc-drawer-section-title { color: #64748b; }
.dark .nc-drawer-action-btn { background: #1e293b; border-color: #334155; color: #94a3b8; }

.nc-bulk-btn-danger {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: var(--nc-critical);
  cursor: pointer;
  transition: var(--nc-transition);
}

.nc-bulk-btn-danger:hover {
  background: var(--nc-critical);
  border-color: var(--nc-critical);
  color: #fff;
}

.nc-card-action-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  border: none;
  background: var(--nc-primary);
  color: #fff;
  cursor: pointer;
  transition: var(--nc-transition);
}

.nc-card-action-btn-primary:hover {
  background: var(--nc-primary-dark);
}

.nc-card-new {
  animation: ncFadeIn 0.6s ease;
}

@keyframes ncFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.dark .nc-bulk-btn-danger {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.dark .nc-bulk-btn-danger:hover {
  background: var(--nc-critical);
  color: #fff;
}

/* Empty state alias */
.nc-empty { 
  text-align: center;
  padding: 48px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.nc-empty-icon-wrap {
  position: relative;
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--nc-bg);
  border-radius: 50%;
  margin-bottom: 4px;
}

.nc-empty-icon-bell {
  width: 36px;
  height: 36px;
  color: var(--nc-text-muted);
}

.nc-empty-icon-slash {
  position: absolute;
  width: 18px;
  height: 18px;
  color: var(--nc-critical);
  bottom: 18px;
  right: 16px;
  opacity: 0.6;
}

.nc-empty-desc {
  font-size: 13px;
  color: var(--nc-text-muted);
  max-width: 360px;
  line-height: 1.5;
}

.nc-empty-connection {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--nc-warning-bg);
  color: var(--nc-warning);
  border-radius: 8px;
  font-size: 11px;
  font-weight: 500;
  max-width: 400px;
}

.nc-btn-hot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--nc-radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--nc-transition);
  border: 1px solid transparent;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #fff;
}

.nc-btn-hot:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.dark .nc-empty-connection {
  background: rgba(245, 158, 11, 0.1);
  color: #fbbf24;
}

/* ================= Realtime notification settings (header dropdown) ================= */
.notif-settings {
  background: rgba(255, 255, 255, 0.85);
}
.dark .notif-settings {
  background: rgba(17, 24, 39, 0.85);
}
/* Top accent gradient bar inside the settings card. */
.notif-settings-accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  pointer-events: none;
  background: linear-gradient(90deg, var(--nc-primary, #4f46e5), rgba(99, 102, 241, 0.25));
}
.dark .notif-settings-accent {
  background: linear-gradient(90deg, var(--nc-primary, #4f46e5), rgba(129, 140, 248, 0.3));
}
/* Settings header icon tile. */
.notif-settings-icon {
  background: rgba(79, 70, 229, 0.1);
  color: var(--nc-primary, #4f46e5);
}
.dark .notif-settings-icon {
  background: rgba(79, 70, 229, 0.18);
  color: #a5b4fc;
}
/* Browser permission status chips. */
.notif-perm-badge,
.notif-perm-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 9999px;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}
.notif-perm-granted {
  color: #047857;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.dark .notif-perm-granted {
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(16, 185, 129, 0.35);
}
.notif-perm-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #10b981;
  animation: nc-perm-pulse 2s ease-out infinite;
}
@keyframes nc-perm-pulse {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.45); }
  70% { box-shadow: 0 0 0 5px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}
.notif-perm-btn {
  color: #fff;
  background: var(--nc-primary, #4f46e5);
  border: 1px solid var(--nc-primary, #4f46e5);
  cursor: pointer;
  transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
}
.notif-perm-btn:hover {
  background: #4338ca;
  border-color: #4338ca;
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.35);
}
.notif-perm-btn:active {
  transform: scale(0.96);
}
.notif-perm-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.4);
}
.notif-perm-denied {
  color: #9ca3af;
  background: rgba(107, 114, 128, 0.1);
  border: 1px solid rgba(107, 114, 128, 0.25);
}
.dark .notif-perm-denied {
  color: #6b7280;
  background: rgba(107, 114, 128, 0.12);
  border-color: rgba(107, 114, 128, 0.3);
}
/* Footer live/connecting status (compiled stylesheet lacks emerald utilities). */
.notif-live-status {
  color: #059669;
}
.dark .notif-live-status {
  color: #34d399;
}

/* ===== Notification Settings Grid ===== */
.notif-settings-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
@media (min-width: 480px) {
  .notif-settings-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 768px) {
  .notif-settings-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ===== Notification Setting Card ===== */
.notif-setting-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 2px;
  border-radius: 14px;
  border: 1px solid rgba(229, 231, 235, 0.8);
  background: rgba(249, 250, 251, 0.7);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  -webkit-user-select: none;
}
.notif-setting-card:hover {
  border-color: rgba(79, 70, 229, 0.35);
  background: rgba(79, 70, 229, 0.05);
}
.notif-setting-card.is-active {
  border-color: rgba(79, 70, 229, 0.4);
  background: rgba(79, 70, 229, 0.07);
}
.notif-setting-card:has(input:focus-visible) {
  outline: none;
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.35);
}
.dark .notif-setting-card {
  border-color: rgba(55, 65, 81, 0.8);
  background: rgba(31, 41, 55, 0.6);
}
.dark .notif-setting-card:hover {
  border-color: rgba(99, 102, 241, 0.4);
  background: rgba(79, 70, 229, 0.1);
}
.dark .notif-setting-card.is-active {
  border-color: rgba(99, 102, 241, 0.5);
  background: rgba(79, 70, 229, 0.12);
}

/* Icon */
.notif-setting-icon {
  flex: 0 0 36px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 14px;
  color: #9ca3af;
  background: #e5e7eb;
  transition: all 0.2s ease;
}
.notif-setting-icon.active {
  color: #fff;
  background: var(--nc-primary, #4f46e5);
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.3);
}
.dark .notif-setting-icon {
  color: #6b7280;
  background: #374151;
}
.dark .notif-setting-icon.active {
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.4);
}

/* Content */
.notif-setting-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.notif-setting-title {
  font-size: 11px;
  font-weight: 700;
  color: #374151;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dark .notif-setting-title {
  color: #e5e7eb;
}
.notif-setting-status {
  font-size: 10px;
  color: #9ca3af;
  transition: color 0.2s ease;
}
.notif-setting-status.active {
  color: var(--nc-primary, #4f46e5);
  font-weight: 600;
}
.dark .notif-setting-status {
  color: #6b7280;
}
.dark .notif-setting-status.active {
  color: var(--nc-primary, #a5b4fc);
}

/* Toggle */
.notif-toggle {
  flex: 0 0 40px;
  width: 40px;
  height: 22px;
  border-radius: 11px;
  background: #d1d5db;
  position: relative;
  transition: background-color 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.notif-toggle.active {
  background: var(--nc-primary, #4f46e5);
}
.dark .notif-toggle {
  background: #4b5563;
}
.notif-toggle-knob {
  position: absolute;
  top: 2.5px;
  left: 2.5px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.1);
  transform: translateX(0);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.notif-toggle.active .notif-toggle-knob {
  transform: translateX(18px);
}

/* ===== Compact "small" variants for the header settings block ===== */
.notif-perm-badge--sm,
.notif-perm-btn--sm {
  padding: 2px 6px;
  gap: 3px;
  font-size: 8px;
  border-radius: 9999px;
}
.notif-perm-badge--sm .notif-perm-dot {
  width: 4px;
  height: 4px;
}
.notif-settings-grid--sm {
  gap: 4px;
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 480px) {
  .notif-settings-grid--sm {
    grid-template-columns: repeat(3, 1fr);
  }
}
.notif-settings-grid--sm .notif-setting-card {
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 5px 6px;
  border-radius: 9px;
}
.notif-settings-grid--sm .notif-setting-icon {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  font-size: 11px;
}
.notif-settings-grid--sm .notif-setting-content {
  align-items: center;
  text-align: center;
  gap: 1px;
}
.notif-settings-grid--sm .notif-setting-title {
  font-size: 9px;
}
.notif-settings-grid--sm .notif-setting-status {
  font-size: 8px;
}
.notif-toggle--sm {
  flex: 0 0 28px;
  width: 28px;
  height: 16px;
  border-radius: 8px;
}
.notif-toggle--sm .notif-toggle-knob {
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
}
.notif-toggle--sm.active .notif-toggle-knob {
  transform: translateX(12px);
}

/* ===== Sound-test footer: equalizer + wave-button animations ===== */
.nc-eq {
  width: 12px;
}
.nc-eq-bar {
  width: 2px;
  height: 3px;
  border-radius: 1px;
  background: #10b981;
  animation: nc-eq-bounce 1.1s ease-in-out infinite;
  transform-origin: bottom;
}
.nc-eq-bar--2 {
  height: 6px;
  animation-delay: 0.15s;
}
.nc-eq-bar--3 {
  height: 4px;
  animation-delay: 0.3s;
}
.nc-eq-muted .nc-eq-bar {
  background: #9ca3af;
  animation-play-state: paused;
  transform: scaleY(0.4);
}
.dark .nc-eq-bar {
  background: #34d399;
}
.dark .nc-eq-muted .nc-eq-bar {
  background: #6b7280;
}
@keyframes nc-eq-bounce {
  0%, 100% {
    transform: scaleY(0.35);
  }
  50% {
    transform: scaleY(1.35);
  }
}
/* ===== Sound-test button (CSS-driven, no utility soup) ===== */
.notif-sound-btn {
  --nc-snd-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(241, 245, 249, 0.92));
  --nc-snd-border: rgba(148, 163, 184, 0.38);
  --nc-snd-color: #475569;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid var(--nc-snd-border);
  background: var(--nc-snd-bg);
  color: var(--nc-snd-color);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.07);
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.2s ease, color 0.2s ease, background 0.2s ease,
    box-shadow 0.2s ease, opacity 0.2s ease, filter 0.2s ease;
}
/* Modern glass top-highlight edge */
.notif-sound-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: 8px;
  right: 8px;
  height: 1px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.notif-sound-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(79, 70, 229, 0.5);
  color: var(--nc-primary, #4f46e5);
  background: linear-gradient(135deg, rgba(238, 242, 255, 0.98), rgba(255, 255, 255, 0.98));
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.18);
}
.notif-sound-btn:hover:not(:disabled)::before {
  opacity: 1;
}
.notif-sound-btn:active:not(:disabled) {
  transform: translateY(0) scale(0.93);
}
.notif-sound-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.45);
}
.notif-sound-btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  filter: grayscale(0.35);
  box-shadow: none;
}
.notif-sound-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 13px;
  height: 13px;
  color: inherit;
  transition: transform 0.2s ease, color 0.2s ease;
}
.notif-sound-icon .notif-sound-svg {
  width: 12px;
  height: 12px;
  display: block;
}
.notif-sound-btn:hover:not(:disabled) .notif-sound-icon {
  transform: scale(1.2) rotate(-10deg);
}
.notif-sound-btn:active:not(:disabled) .notif-sound-icon {
  transform: scale(0.85);
}
.notif-sound-label {
  color: inherit;
}
/* Dark mode */
.dark .notif-sound-btn {
  --nc-snd-bg: linear-gradient(135deg, rgba(31, 41, 55, 0.85), rgba(17, 24, 39, 0.9));
  --nc-snd-border: rgba(71, 85, 105, 0.7);
  --nc-snd-color: #9ca3af;
}
.dark .notif-sound-btn:hover:not(:disabled) {
  color: var(--nc-primary, #a5b4fc);
  border-color: rgba(99, 102, 241, 0.55);
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.14), rgba(31, 41, 55, 0.9));
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

/* ===== Legacy: notif-setting-item (kept for other uses) ===== */
.notif-setting-item {
  user-select: none;
  -webkit-user-select: none;
  position: relative;
}
.notif-setting-item:hover {
  border-color: rgba(79, 70, 229, 0.3) !important;
  background: rgba(79, 70, 229, 0.04) !important;
}
.notif-setting-item:has(input:checked) {
  border-color: rgba(79, 70, 229, 0.3) !important;
  background: rgba(79, 70, 229, 0.06) !important;
}
.dark .notif-setting-item:has(input:checked) {
  background: rgba(79, 70, 229, 0.08) !important;
}
.notif-setting-item:has(input:focus-visible) {
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.4);
}
.dark .notif-live-status {
  color: #34d399;
}
.notif-setting-item {
  user-select: none;
  -webkit-user-select: none;
  position: relative;
}
.notif-setting-item:hover {
  border-color: rgba(79, 70, 229, 0.3) !important;
  background: rgba(79, 70, 229, 0.04) !important;
}
.notif-setting-item:has(input:checked) {
  border-color: rgba(79, 70, 229, 0.3) !important;
  background: rgba(79, 70, 229, 0.06) !important;
}
.dark .notif-setting-item:has(input:checked) {
  background: rgba(79, 70, 229, 0.08) !important;
}
.notif-setting-item:has(input:focus-visible) {
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.4);
}
/* Custom toggle switch (guaranteed rendering even where transform utilities
   are absent from the compiled stylesheet). The sr-only checkbox drives state. */
.notif-switch {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
  width: 28px;
  height: 16px;
  border-radius: 9999px;
  background: #d1d5db;
  transition: background-color 0.2s ease;
}
.dark .notif-switch {
  background: #4b5563;
}
.notif-setting-item:has(input:checked) .notif-switch {
  background: var(--nc-primary, #4f46e5);
}
.notif-switch-knob {
  position: absolute;
  top: 2px;
  left: 0;
  width: 12px;
  height: 12px;
  border-radius: 9999px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
  transform: translateX(2px);
  transition: transform 0.2s ease;
}
.notif-setting-item:has(input:checked) .notif-switch-knob {
  transform: translateX(14px);
}
/* Modern horizontal category pills (active = aria-selected). */
.notif-category-pill {
  border-color: #e5e7eb;
  background: #f9fafb;
  color: #4b5563;
  box-shadow: none;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease,
    box-shadow 0.2s ease, transform 0.1s ease;
}
.notif-category-pill:hover {
  border-color: rgba(79, 70, 229, 0.3);
  background: rgba(79, 70, 229, 0.05);
  color: var(--nc-primary, #4f46e5);
}
.notif-category-pill[aria-selected="true"] {
  border-color: var(--nc-primary, #4f46e5);
  background: var(--nc-primary, #4f46e5);
  color: #fff;
  box-shadow: 0 1px 2px rgba(79, 70, 229, 0.3);
}
.notif-category-pill[aria-selected="true"]:hover {
  color: #fff;
  background: var(--nc-primary, #4f46e5);
  border-color: var(--nc-primary, #4f46e5);
}
.notif-category-pill:active {
  transform: scale(0.95);
}
.notif-category-pill:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.4);
}
.dark .notif-category-pill {
  border-color: #374151;
  background: #1f2937;
  color: #d1d5db;
}
.dark .notif-category-pill:hover {
  border-color: rgba(99, 102, 241, 0.4);
  background: rgba(79, 70, 229, 0.1);
  color: var(--nc-primary, #a5b4fc);
}

/* ================= Realtime notification toast ================= */
#realtimeNotificationAlertContainer {
  position: fixed;
  top: 74px;
  right: 14px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 340px;
  max-width: calc(100vw - 28px);
  pointer-events: none;
}

.rnt-toast {
  pointer-events: auto;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #ffffff;
  color: #111827;
  border: 1px solid #e5e7eb;
  box-shadow: 0 12px 32px -8px rgba(15, 23, 42, 0.35);
  cursor: pointer;
  opacity: 0;
  transform: translateX(24px) scale(0.96);
  transition: opacity 0.2s ease, transform 0.2s ease;
  font-family: 'Inter', 'Battambang', 'Nunito', system-ui, -apple-system, sans-serif;
}
.rnt-toast.rnt-toast-enter {
  opacity: 1;
  transform: translateX(0) scale(1);
}
.rnt-toast.rnt-toast-leave {
  opacity: 0;
  transform: translateX(24px) scale(0.96);
}
.rnt-toast::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: linear-gradient(180deg, #6366f1, #8b5cf6);
}
.dark .rnt-toast {
  background: #1f2937;
  color: #f3f4f6;
  border-color: #374151;
}

.rnt-toast-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6366f1;
}
.dark .rnt-toast-header {
  color: #a5b4fc;
}
.rnt-toast-bell {
  font-size: 12px;
}
.rnt-toast-new {
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.rnt-toast-title {
  font-size: 13px;
  font-weight: 700;
  color: #111827;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.dark .rnt-toast-title {
  color: #f9fafb;
}
.rnt-toast-msg {
  font-size: 12px;
  color: #4b5563;
  line-height: 1.4;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.dark .rnt-toast-msg {
  color: #d1d5db;
}
.rnt-toast-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 2px;
}
.rnt-toast-time {
  font-size: 10px;
  color: #9ca3af;
}
.dark .rnt-toast-time {
  color: #6b7280;
}
.rnt-toast-close {
  border: none;
  background: transparent;
  color: #9ca3af;
  font-size: 12px;
  line-height: 1;
  padding: 2px 4px;
  cursor: pointer;
  border-radius: 6px;
  transition: color 0.15s ease, background 0.15s ease;
}
.rnt-toast-close:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.08);
}

@media (max-width: 640px) {
  #realtimeNotificationAlertContainer {
    top: auto;
    bottom: 14px;
    right: 14px;
    left: 14px;
    width: auto;
  }
}

/* ===== Logout modal — small, centered, custom CSS ===== */
.logout-modal-wrap {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.logout-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.logout-modal-card {
  position: relative;
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.35);
}
.dark .logout-modal-card {
  background: #0e1726;
}
.logout-modal-header {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logout-modal-header-icon {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}
.logout-modal-header-icon svg {
  width: 18px;
  height: 18px;
  color: #ffffff;
}
.logout-modal-title {
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
}
.logout-modal-close {
  color: rgba(255, 255, 255, 0.8);
  transition: color 0.15s ease;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 4px;
}
.logout-modal-close:hover {
  color: #ffffff;
}
.logout-modal-close svg {
  width: 16px;
  height: 16px;
}
.logout-modal-body {
  padding: 18px 20px 22px;
  text-align: center;
}
.logout-modal-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
}
.logout-modal-badge {
  position: relative;
}
.logout-modal-badge-circle {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: #fee2e2;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dark .logout-modal-badge-circle {
  background: rgba(127, 29, 29, 0.3);
}
.logout-modal-badge-circle svg {
  width: 24px;
  height: 24px;
  color: #ef4444;
  animation: logout-modal-pulse 1.6s ease-in-out infinite;
}
.logout-modal-spin-ring {
  position: absolute;
  inset: -6px;
  border-radius: 999px;
  border: 2px solid rgba(254, 202, 202, 0.7);
  border-top-color: #ef4444;
  animation: logout-modal-spin 0.9s linear infinite;
}
.dark .logout-modal-spin-ring {
  border-color: rgba(127, 29, 29, 0.4);
  border-top-color: #ef4444;
}
.logout-modal-text-title {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
}
.dark .logout-modal-text-title {
  color: #e5e7eb;
}
.logout-modal-text-sub {
  margin: 3px 0 0;
  font-size: 11px;
  color: #9ca3af;
}
.dark .logout-modal-text-sub {
  color: #6b7280;
}
.logout-modal-dots {
  display: flex;
  align-items: center;
  gap: 5px;
}
.logout-modal-dots span {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #f87171;
  animation: logout-modal-bounce 1s ease-in-out infinite;
}
.logout-modal-dots span:nth-child(2) {
  animation-delay: 0.15s;
}
.logout-modal-dots span:nth-child(3) {
  animation-delay: 0.3s;
}
@keyframes logout-modal-spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes logout-modal-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}
@keyframes logout-modal-bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
}
.logout-modal-success-badge-circle {
  background: #dcfce7;
}
.dark .logout-modal-success-badge-circle {
  background: rgba(6, 78, 59, 0.3);
}
.logout-modal-success-badge-circle svg {
  color: #22c55e;
}
.logout-modal-success-ring {
  border: 2px solid rgba(187, 247, 208, 0.7);
  border-top-color: #22c55e;
}
.dark .logout-modal-success-ring {
  border-color: rgba(6, 78, 59, 0.4);
  border-top-color: #22c55e;
}