.mainpageHeader {
  position: fixed;
  top: clamp(10px, 1.4vh, 22px);
  left: 50%;
  transform: translateX(-50%);
  width: min(1300px, 92vw);
  z-index: 3000;
  color: white;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
  border-radius: 10px;
}

.mainpageHeaderInner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: clamp(10px, 1.2vh, 18px) clamp(16px, 2vw, 28px);
}

.leftsideHeader,
.rightsideHeader {
  display: flex;
  align-items: center;
  min-width: 0;
}

.leftsideHeader {
  flex: 1 1 auto;
  min-width: 0;
}

.leftsideHeaderofright {
  margin-left: 24px;
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  flex-wrap: wrap;
}

.rightsideHeader {
  flex: 0 0 auto;
  gap: 8px;
}

.leftsideHeaderofright {
  margin-left: 24px;
  display: flex;
  gap: 4px;
}

.headerBtn {
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  border: none;
  font-size: 13px;
  font-weight: 500;
  padding: 7px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.headerBtn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.rightsideHeader {
  gap: 8px;
}

.notificationLinkBtn {
  flex: 1;
  min-width: 0;
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
  background: transparent;
  border: none;
  text-align: left;
  color: inherit;
  cursor: pointer;
  border-radius: 12px;
}

.aiBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: clamp(38px, 2.9vw, 46px);
  padding: 0 18px;
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(
    135deg,
    rgba(120, 170, 255, 0.22),
    rgba(120, 255, 210, 0.12)
  );
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  cursor: pointer;
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
  transition:
    transform 0.18s ease,
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    color 0.2s ease;
}

.aiBtn:hover {
  transform: translateY(-1px);
  background: linear-gradient(
    135deg,
    rgba(120, 170, 255, 0.22),
    rgba(120, 255, 210, 0.12)
  );
  border-color: rgba(150, 200, 255, 0.32);
  box-shadow:
    0 14px 28px rgba(0, 0, 0, 0.24),
    0 0 18px rgba(120, 170, 255, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.aiBtn:active {
  transform: translateY(0);
}

.aiBtn::before {
  content: "✦";
  font-size: 14px;
  line-height: 1;
  opacity: 0.95;
}

.notiBtn {
  width: clamp(36px, 2.8vw, 44px);
  height: clamp(36px, 2.8vw, 44px);
  font-size: clamp(16px, 1.2vw, 20px);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.2s ease,
    transform 0.15s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
  padding: 0;
  line-height: 1;
}

.notiBtn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

.userBtn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 20px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-left: 10px;
}

.userBtn:hover {
  background: rgba(255, 69, 58, 0.15); /* Subtle red tint on hover */
  border-color: rgba(255, 69, 58, 0.3);
  color: #ff453a;
}

.notiWrap {
  position: relative;
  display: inline-block;
}

.notiBadge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  background: rgba(255, 73, 73, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: white;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;

  box-shadow: 0 8px 18px rgba(255, 73, 73, 0.28);
}

.ProjectDropDwonMenu {
  position: absolute;
  top: calc(100% + 8px);
  left: 6%;
  min-width: clamp(180px, 15vw, 240px);
  padding: 10px;
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 1000;
  animation: header-pop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  background:
    linear-gradient(
      180deg,
      rgba(18, 18, 22, 0.76) 0%,
      rgba(18, 18, 22, 0.84) 100%
    ),
    rgba(36, 42, 54, 0.82);

  backdrop-filter: blur(28px) saturate(130%) brightness(0.76);
  -webkit-backdrop-filter: blur(28px) saturate(130%) brightness(0.76);

  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

@keyframes header-pop {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.ProjectDropDwonMenuBtn {
  width: 100%;
  padding: 12px 14px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ProjectDropDwonMenuBtn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  padding-left: 18px; /* Slight slide effect */
}

.logoBtn {
  background: none;
  border: none;
  font-size: 20px;
  color: #fff;
  font-weight: 800;
  letter-spacing: -0.5px;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
  padding: 0;
}

.logoBtn:hover {
  opacity: 0.8;
  transform: scale(1.02);
}

/*===================== notification popup =====================*/

.notiBtn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.24);
  transform: translateY(-1px);
}

.notificationPopup {
  position: absolute;
  top: calc(100% + 2px);
  right: 11%;
  width: clamp(200px, 28vw, 420px);
  z-index: 9999;
  background: transparent;
}

.notificationPopupInner {
  padding: 14px;
  border-radius: 22px;
  background: rgba(8, 18, 20, 0.82);
  backdrop-filter: blur(28px) saturate(130%) brightness(0.7);
  -webkit-backdrop-filter: blur(28px) saturate(130%) brightness(0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  color: white;
}

.notificationList {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 400px;
  overflow-y: auto;
}
.notificationList::-webkit-scrollbar {
  width: 8px;
}

.notificationList::-webkit-scrollbar-track {
  background: transparent;
}

.notificationList::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.16);
  border-radius: 999px;
}

.notificationEmpty {
  padding: 18px 14px;
  text-align: center;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.74);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.notificationItem {
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.11);
  transition:
    transform 0.18s ease,
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
  max-height: 20vh;
  margin: 2px;
  padding: 10px;
}

.notificationItem:hover {
  background: rgba(255, 255, 255, 0.085);
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.16);
}

.notificationText strong {
  color: white;
  font-weight: 700;
}

.notificationActions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

.notificationAcceptBtn,
.notificationRejectBtn {
  height: 36px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: white;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;

  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.15s ease,
    box-shadow 0.2s ease;
}

.notificationAcceptBtn {
  background: rgba(73, 184, 70, 0.58);
  border-color: rgba(73, 184, 70, 0.3);
}

.notificationAcceptBtn:hover {
  background: rgba(73, 184, 70, 0.72);
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(73, 184, 70, 0.22);
}

.notificationRejectBtn {
  background: rgba(255, 255, 255, 0.08);
}

.notificationRejectBtn:hover {
  background: rgba(255, 255, 255, 0.13);
  border-color: rgba(255, 255, 255, 0.24);
  transform: translateY(-1px);
}

@media (max-width: 640px) {
  .notificationPopup {
    width: min(92vw, 380px);
    right: -8px;
  }

  .notificationPopupInner {
    padding: 12px;
    border-radius: 18px;
  }

  .notificationActions {
    flex-direction: column;
  }

  .notificationAcceptBtn,
  .notificationRejectBtn {
    width: 100%;
  }
}

.notificationText {
  flex: 1;
  min-width: 0;
  color: white;
  font-size: 14px;
  line-height: 1.45;
}

.notificationMessage {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  line-height: 1.45;
}

.notificationDeleteBtn {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.88);
  padding: 7px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.15s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.notificationDeleteBtn:hover {
  background: rgba(255, 80, 80, 0.16);
  border-color: rgba(255, 120, 120, 0.35);
  transform: translateY(-1px);
}

.notificationDeleteBtn:active {
  transform: translateY(0);
}

.mailboxInviteActions {
  margin-top: 24px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.mailboxRejectBtn,
.mailboxAcceptBtn {
  min-width: 120px;
  height: 44px;
  padding: 0 18px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #fff;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease,
    opacity 0.18s ease;
}

/* Reject */
.mailboxRejectBtn {
  background: rgba(255, 255, 255, 0.045);
  color: rgba(255, 255, 255, 0.88);
  border-color: rgba(255, 255, 255, 0.08);
}

.mailboxRejectBtn:hover {
  transform: translateY(-1px);
  background: rgba(255, 80, 80, 0.12);
  border-color: rgba(255, 120, 120, 0.28);
}

/* Accept */
.mailboxAcceptBtn {
  background: linear-gradient(
    135deg,
    rgba(90, 220, 170, 0.22),
    rgba(60, 180, 140, 0.16)
  );
  border-color: rgba(120, 255, 210, 0.2);
  color: #f4fffb;
}

.mailboxAcceptBtn:hover {
  transform: translateY(-1px);
  background: linear-gradient(
    135deg,
    rgba(100, 235, 180, 0.3),
    rgba(65, 190, 145, 0.22)
  );
  border-color: rgba(140, 255, 220, 0.35);
}

.mailboxRejectBtn:active,
.mailboxAcceptBtn:active {
  transform: translateY(0);
}

.mailboxRejectBtn:disabled,
.mailboxAcceptBtn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.mainpageHeader {
  position: fixed;
  top: clamp(10px, 1.4vh, 22px);
  left: 50%;
  transform: translateX(-50%);
  width: min(1300px, 92vw);
  z-index: 9999;
  color: white;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
  border-radius: 10px;
}

@media (max-width: 1439px) and (min-width: 1281px) {
  .mainpageHeader {
    width: min(1180px, 86vw);
  }

  .mainpageHeaderInner {
    padding: 10px 22px;
  }

  .leftsideHeaderofright {
    margin-left: 20px;
    gap: 4px;
  }

  .rightsideHeader {
    gap: 8px;
  }

  .headerBtn {
    font-size: 13px;
    padding: 7px 12px;
  }

  .aiBtn {
    padding: 0 14px;
    font-size: 12px;
  }

  .userBtn {
    padding: 7px 14px;
    margin-left: 4px;
  }
}

@media (max-width: 1280px) {
  .leftsideHeaderofright {
    margin-left: 12px;
    gap: 0;
  }

  .headerBtn {
    font-size: 11px;
    padding: 6px 8px;
  }

  .aiBtn {
    padding: 0 10px;
    font-size: 10px;
  }

  .userBtn {
    padding: 6px 10px;
    font-size: 11px;
  }

  .rightsideHeader {
    gap: 4px;
  }
}

@media (min-width: 1900px) {
  .mainpageHeader {
    width: min(1600px, 92vw);
    border-radius: 16px;
  }

  .mainpageHeaderInner {
    padding: 18px 38px;
  }

  .leftsideHeaderofright {
    margin-left: 34px;
    gap: 8px;
  }

  .rightsideHeader {
    gap: 12px;
  }

  .headerBtn {
    font-size: 17px;
    font-weight: 500;
    padding: 11px 16px;
    border-radius: 12px;
  }

  .logoBtn {
    font-size: 25px;
    letter-spacing: -0.5px;
  }

  .aiBtn {
    height: 54px;
    padding: 0 24px;
    font-size: 15px;
    border-radius: 18px;
  }

  .aiBtn::before {
    font-size: 16px;
  }

  .notiBtn {
    width: 54px;
    height: 54px;
    font-size: 22px;
    border-radius: 15px;
  }

  .notiBadge {
    min-width: 22px;
    height: 22px;
    font-size: 12px;
    top: -7px;
    right: -7px;
  }

  .userBtn {
    font-size: 15px;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 14px;
    margin-left: 12px;
  }
}

.adminAccessOverlay {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--theme-background-popup);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.adminAccessPopup {
  width: 100%;
  max-width: 460px;
  border-radius: 24px;
  border: 1px solid var(--popup-panel-border);
  background: var(--popup-panel-bg);
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  color: white;
  padding: 24px;
}

.adminAccessPopupTop {
  margin-bottom: 18px;
}

.adminAccessEyebrow {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 8px;
}

.adminAccessPopupTop h3 {
  margin: 0 0 8px;
  font-size: 30px;
}

.adminAccessDesc {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.6;
}

.adminAccessForm {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.adminAccessInput {
  width: 100%;
  height: 52px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: white;
  padding: 0 16px;
  font: inherit;
  outline: none;
}

.adminAccessInput::placeholder {
  color: rgba(255, 255, 255, 0.42);
}

.adminAccessInput:focus {
  border-color: rgba(255, 255, 255, 0.24);
}

.adminAccessError {
  font-size: 13px;
  color: #ff9d9d;
}

.adminAccessActions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.adminAccessBtn {
  min-width: 120px;
  height: 46px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  font: inherit;
  font-weight: 700;
  color: white;
}

.adminAccessBtn.ghost {
  background: rgba(255, 255, 255, 0.06);
}

.adminAccessBtn.primary {
  background: rgba(255, 255, 255, 0.16);
}

.adminAccessBtn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
