/* ===============================
   GLOBAL FIXES
================================ */
html, body {
  max-width: 100%;
  overflow-x: hidden;
}

/* ===============================
   NOTIFICATION DROPDOWN
================================ */
.notification-dropdown {
  position: relative;
  display: inline-block;
  z-index: 3000;
}

/* Bell button */
.notification-btn {
  background: #14b8a6;
  border: none;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: background 0.2s ease;
}

.notification-btn:hover {
  background: #0d9488;
}

/* Badge */
.notification-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ef4444;
  color: #fff;
  border-radius: 50%;
  min-width: 18px;
  height: 18px;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

/* ===============================
   DROPDOWN PANEL
================================ */
.notification-menu {
  position: fixed;
  top: 56px;                /* topbar height */
  right: 12px;
  width: 320px;
  max-width: calc(100vw - 24px);
  max-height: calc(100vh - 70px);
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
  overflow: hidden;
  display: none;
  z-index: 99999;
}

.notification-menu.show {
  display: block;
}

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

.notification-header h6 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}

.mark-all-read {
  font-size: 12px;
  color: #2563eb;
  text-decoration: none;
}

/* ===============================
   LIST
================================ */
.notification-list {
  max-height: 300px;
  overflow-y: auto;
}

.notification-item {
  display: flex;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid #f1f5f9;
  text-decoration: none;
  color: #1f2937;
}

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

.notification-item.unread {
  background: #eef6ff;
}

.notification-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #3b82f6;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.notification-content {
  flex: 1;
}

.notification-text {
  font-size: 13px;
  margin-bottom: 2px;
}

.notification-time {
  font-size: 11px;
  color: #6b7280;
}

/* ===============================
   FOOTER
================================ */
.notification-footer {
  padding: 10px;
  text-align: center;
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
}

.view-all {
  font-size: 13px;
  color: #2563eb;
  text-decoration: none;
  font-weight: 500;
}

/* ===============================
   MOBILE FIX (IMPORTANT)
================================ */
@media (max-width: 576px) {

  .notification-menu {
    top: 56px;
    left: 140px;
    right: 0;
    width: 100%;
    max-width: 100%;
    height: calc(50vh - 20px);
    max-height: none;
    border-radius: 0;
  }

  .notification-list {
    max-height: none;
    height: calc(60vh - 140px);
  }
}
