/* === NOTIFICATION BADGE === */
.notif-badge,
#notifBadge,
#mobileNotifBadge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 5;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* === INBOX BUTTON === */
.navbar-inbox-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--onyx);
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
}

.navbar-inbox-btn:hover {
  background: rgba(0,0,0,0.05);
}

.navbar-inbox-btn .action-icon {
  font-size: 22px;
}

[data-theme="dark"] .navbar-inbox-btn {
  color: var(--white);
}

[data-theme="dark"] .navbar-inbox-btn:hover {
  background: rgba(255,255,255,0.1);
}

/* === INBOX MODAL === */
.inbox-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 0;
}

.inbox-modal[hidden] {
  display: none;
}

.inbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.inbox-modal.open .inbox-backdrop {
  opacity: 1;
}

/* === INBOX PANEL === */
.inbox-panel {
  position: relative;
  width: 100%;
  max-width: 420px;
  height: 100vh;
  background: #fff;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -4px 0 20px rgba(0,0,0,0.15);
}

.inbox-modal.open .inbox-panel {
  transform: translateX(0);
}

[data-theme="dark"] .inbox-panel {
  background: #1a1a2e;
}

/* === INBOX HEADER === */
.inbox-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
}

[data-theme="dark"] .inbox-header {
  background: #16162a;
  border-color: #2d2d4a;
}

.inbox-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 600;
  color: #1a1a2e;
  margin: 0;
}

.inbox-title ion-icon {
  font-size: 22px;
  color: var(--user-accent, #5BA4E6);
}

[data-theme="dark"] .inbox-title {
  color: #fff;
}

.inbox-header__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.inbox-mark-all {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: transparent;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  color: #6b7280;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.inbox-mark-all:hover {
  background: var(--user-accent, #5BA4E6);
  border-color: var(--user-accent, #5BA4E6);
  color: #fff;
}

.inbox-mark-all ion-icon {
  font-size: 16px;
}

[data-theme="dark"] .inbox-mark-all {
  border-color: #3d3d5c;
  color: #9ca3af;
}

.inbox-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.2s;
}

.inbox-close:hover {
  background: #f3f4f6;
  color: #111;
}

.inbox-close ion-icon {
  font-size: 22px;
}

[data-theme="dark"] .inbox-close:hover {
  background: #2d2d4a;
  color: #fff;
}

/* === INBOX BODY === */
.inbox-body {
  flex: 1;
  overflow-y: auto;
  padding: 0;
}

/* === LOADING STATE === */
.inbox-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  gap: 12px;
  color: #6b7280;
}

.inbox-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #e5e7eb;
  border-top-color: var(--user-accent, #5BA4E6);
  border-radius: 50%;
  animation: inbox-spin 0.8s linear infinite;
}

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

/* === EMPTY STATE === */
.inbox-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 30px;
  text-align: center;
  color: #6b7280;
}

.inbox-empty ion-icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.5;
}

.inbox-empty span {
  font-size: 16px;
  font-weight: 500;
  color: #374151;
}

.inbox-empty p {
  font-size: 14px;
  margin-top: 8px;
  max-width: 260px;
}

[data-theme="dark"] .inbox-empty span {
  color: #e5e7eb;
}

/* === NOTIFICATION ITEMS === */
.inbox-item {
  display: flex;
  gap: 14px;
  padding: 16px 20px;
  border-bottom: 1px solid #f3f4f6;
  cursor: pointer;
  transition: background 0.2s;
  position: relative;
}

.inbox-item:hover {
  background: #f9fafb;
}

.inbox-item.unread {
  background: #fef3e2;
}

.inbox-item.unread:hover {
  background: #fde8c8;
}

[data-theme="dark"] .inbox-item {
  border-color: #2d2d4a;
}

[data-theme="dark"] .inbox-item:hover {
  background: #232340;
}

[data-theme="dark"] .inbox-item.unread {
  background: rgba(91, 164, 230, 0.15);
}

[data-theme="dark"] .inbox-item.unread:hover {
  background: rgba(91, 164, 230, 0.25);
}

.inbox-item__icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--user-accent, #5BA4E6), #7BBDF7);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.inbox-item__icon ion-icon {
  font-size: 20px;
}

.inbox-item__content {
  flex: 1;
  min-width: 0;
}

.inbox-item__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}

.inbox-item__from {
  font-weight: 600;
  color: #1a1a2e;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

[data-theme="dark"] .inbox-item__from {
  color: #fff;
}

.inbox-item__time {
  font-size: 12px;
  color: #9ca3af;
  white-space: nowrap;
}

.inbox-item__text {
  font-size: 14px;
  color: #4b5563;
  margin: 0;
}

[data-theme="dark"] .inbox-item__text {
  color: #9ca3af;
}

.inbox-item__preview {
  font-size: 13px;
  color: #6b7280;
  margin: 6px 0 0;
  font-style: italic;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

[data-theme="dark"] .inbox-item__preview {
  color: #6b7280;
}

.inbox-item__dot {
  position: absolute;
  top: 50%;
  right: 16px;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  background: var(--user-accent, #5BA4E6);
  border-radius: 50%;
}

/* === MOBILE RESPONSIVE === */
@media (max-width: 480px) {
  .inbox-panel {
    max-width: 100%;
  }
  
  .inbox-mark-all span {
    display: none;
  }
  
  .inbox-mark-all {
    padding: 8px;
  }
}

/* === REDUCED MOTION === */
@media (prefers-reduced-motion: reduce) {
  .inbox-backdrop,
  .inbox-panel {
    transition: none;
  }
  
  .inbox-spinner {
    animation: none;
  }
}
