/* PAINEL BASE */

.profile-notification-panel {
  position: fixed;
  top: 72px;
  right: 28px;
  width: 350px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  z-index: 9999;
  background: #151a2b;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  color: #ffffff;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-10px);
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}

.profile-notification-panel.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.profile-notification-panel::-webkit-scrollbar {
  width: 6px;
}

.profile-notification-panel::-webkit-scrollbar-track {
  background: transparent;
}

.profile-notification-panel::-webkit-scrollbar-thumb {
  background: #41465a;
  border-radius: 10px;
}


/* CABEÇALHO DOS PAINÉIS */

.notifications-header,
.profile-panel-header,
.profile-edit-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid #3f4353;
}

.panel-eyebrow {
  display: block;
  margin-bottom: 4px;
  color: #5c91f5;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 1px;
}

.notifications-header h2,
.profile-panel-header h2,
.profile-edit-header h2 {
  margin: 0;
  color: #ffffff;
  font-size: 18px;
  font-weight: 800;
}


/* BOTÃO FECHAR */

.panel-close-btn {
  width: 30px;
  height: 30px;
  border: none;
  background: transparent;
  color: #ffffff;
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.2s ease, opacity 0.2s ease;
}

.panel-close-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}


/* PERFIL - RESUMO */

.profile-summary {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 22px 20px;
  border-bottom: 1px solid #3f4353;
}

.profile-avatar {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 2px solid #ffffff;
  background: #292d40;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 19px;
  font-weight: 800;
}

.profile-summary-text {
  min-width: 0;
}

.profile-summary-text strong {
  display: block;
  color: #ffffff;
  font-size: 16px;
  font-weight: 800;
  word-break: break-word;
}

.profile-summary-text span {
  display: block;
  margin-top: 4px;
  color: #999dac;
  font-size: 11px;
  word-break: break-word;
}


/* PERFIL - INFORMAÇÕES */

.profile-info-list {
  padding: 8px 0;
}

.profile-info-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 13px 20px;
  border-bottom: 1px solid #292d3c;
}

.profile-info-row span {
  color: #777c8e;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.8px;
}

.profile-info-row strong {
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  word-break: break-word;
}


/* ==========================================================
   PERFIL - AÇÕES
   ========================================================== */

.profile-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 15px 20px 18px;
}

.profile-action-primary,
.profile-action-secondary {
  width: 100%;
  min-height: 40px;
  border-radius: 7px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.profile-action-primary {
  border: none;
  background: #2b6ce6;
  color: #ffffff;
}

.profile-action-primary:hover {
  background: #3679f0;
}

.profile-action-secondary {
  border: 1px solid #53586d;
  background: transparent;
  color: #ffffff;
}

.profile-action-secondary:hover {
  background: #191b2b;
}

.profile-action-secondary:last-child {
  color: #ff7777;
}


/* ==========================================================
   MODAL DE EDIÇÃO DO PERFIL
   ========================================================== */

.profile-edit-overlay {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.profile-edit-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.profile-edit-modal {
  width: 430px;
  max-width: 100%;
  background: #10101d;
  border: 1px solid #72778b;
  border-radius: 15px;
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.5);
  transform: scale(0.96);
  transition: transform 0.2s ease;
}

.profile-edit-overlay.active .profile-edit-modal {
  transform: scale(1);
}

.profile-edit-form {
  padding: 22px 20px 20px;
}

.profile-edit-form label {
  display: block;
  margin-bottom: 7px;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
}

.profile-edit-form input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  margin-bottom: 16px;
  box-sizing: border-box;
  border: 1px solid #53586d;
  border-radius: 7px;
  outline: none;
  background: #181a29;
  color: #ffffff;
  font-family: inherit;
  font-size: 13px;
}

.profile-edit-form input:focus {
  border-color: #4c83e9;
}

.profile-edit-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 5px;
}

.profile-edit-buttons button {
  width: auto;
  min-width: 100px;
  padding: 0 16px;
}


/* ==========================================================
   NOTIFICAÇÕES - BOTÃO E BADGE
   ========================================================== */

#notification-button {
  position: relative;
}

#notification-badge {
  position: absolute;
  top: -4px;
  right: -5px;
  min-width: 17px;
  height: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  background: #e74c5b;
  color: #ffffff;
  border: 2px solid #0f0d1e;
  border-radius: 50px;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  pointer-events: none;
}

#notification-badge.hidden {
  display: none;
}


/* ==========================================================
   NOTIFICAÇÕES - PAINEL
   ========================================================== */

#notifications-panel {
  position: fixed;
  top: 75px;
  right: 25px;
  width: 380px;
  max-width: calc(100vw - 30px);
  max-height: calc(100vh - 100px);
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #17142b, #0f0d1d);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 15px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  z-index: 99999;
}

#notifications-panel.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}


/* ==========================================================
   NOTIFICAÇÕES - CABEÇALHO
   ========================================================== */

#notifications-panel .notifications-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

#notifications-panel .panel-eyebrow {
  display: block;
  margin-bottom: 4px;
  color: #858199;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.5px;
}

#notifications-panel h2 {
  margin: 0;
  color: #ffffff;
  font-size: 18px;
  font-weight: 800;
}

#notifications-panel .panel-close-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #aaa6ba;
  font-size: 24px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

#notifications-panel .panel-close-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}


/* ==========================================================
   NOTIFICAÇÕES - AÇÕES (marcar todas como lidas)
   ========================================================== */

.notifications-actions {
  padding: 10px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.notifications-actions button {
  padding: 0;
  border: 0;
  background: transparent;
  color: #7ea3ff;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.notifications-actions button:hover {
  color: #b3c5ff;
  text-decoration: underline;
}


/* ==========================================================
   NOTIFICAÇÕES - LISTA
   ========================================================== */

.notifications-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.notifications-list::-webkit-scrollbar {
  width: 6px;
}

.notifications-list::-webkit-scrollbar-track {
  background: transparent;
}

.notifications-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
}


/* ==========================================================
   NOTIFICAÇÕES - ITEM
   ========================================================== */

.notification-item {
  position: relative;
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 15px 18px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: transparent;
  color: #ffffff;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.18s ease;
}

.notification-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.notification-item.unread {
  background: rgba(43, 108, 230, 0.10);
}

.notification-item.unread:hover {
  background: rgba(43, 108, 230, 0.15);
}

.notification-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.07);
  font-size: 18px;
}

.notification-content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.notification-content strong {
  color: #ffffff;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.35;
}

.notification-message {
  color: #aaa6b9;
  font-size: 12px;
  line-height: 1.4;
}

.notification-time {
  color: #716d82;
  font-size: 10px;
}

.notification-dot {
  width: 7px;
  height: 7px;
  flex-shrink: 0;
  margin-top: 6px;
  border-radius: 50%;
  background: #2b6ce6;
  opacity: 0;
}

.notification-item.unread .notification-dot {
  opacity: 1;
}


/* ==========================================================
   NOTIFICAÇÕES - LISTA VAZIA
   ========================================================== */

.notifications-empty {
  min-height: 230px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px;
  text-align: center;
}

.notifications-empty-icon {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  font-size: 20px;
}

.notifications-empty strong {
  margin-bottom: 5px;
  color: #ffffff;
  font-size: 14px;
}

.notifications-empty span {
  color: #77738a;
  font-size: 12px;
}


/* ==========================================================
   RESPONSIVIDADE
   ========================================================== */

@media (max-width: 600px) {
  .profile-notification-panel {
    top: 65px;
    right: 12px;
    left: 12px;
    width: auto;
    max-width: none;
  }

  .profile-edit-overlay {
    padding: 15px;
  }

  #notifications-panel {
    top: 65px !important;
    left: 10px !important;
    right: 10px !important;
    width: auto !important;
    max-width: none;
    max-height: calc(100vh - 80px);
    border-radius: 14px;
  }

  #notifications-panel .notifications-header {
    padding: 16px;
  }

  .notifications-actions {
    padding: 10px 16px;
  }

  .notification-item {
    padding: 14px;
  }
}

@media (max-width: 380px) {
  #notifications-panel {
    left: 7px !important;
    right: 7px !important;
    top: 60px !important;
    max-height: calc(100vh - 70px);
  }

  .notification-icon {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }

  .notification-content strong {
    font-size: 12px;
  }

  .notification-message {
    font-size: 11px;
  }
}
