@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

/* menu de navegação */
body {
  padding-top: 40px;
}

header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 40px;
  background-color: var(--cor-secundaria);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 50px;
  box-sizing: border-box;
}

.title {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-top: 5px;
  height: 100%;
}

.title img {
  height: 30px;
  width: 130px;
}

/* Navbar desktop */
.navbar {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
}

/* Menu grupos (desktop) */
.menu-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  height: 100%;
}

.menu-dropdown {
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
}

.dropdown-toggle {
  background: none;
  border: none;
  color: var(--cor-primaria);
  cursor: pointer;
  font-size: 16px;
  padding: 0 10px;
  height: 100%;
}

.dropdown-toggle:hover {
  background-color: transparent;
  color: var(--identidade);
}

.dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--cor-secundaria);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  flex-direction: column;
  min-width: 150px;
  padding: 5px 0;
  z-index: 1001;
  border-radius: 4px;
}

.dropdown-content a {
  padding: 5px 20px;
  text-decoration: none;
  color: var(--cor-primaria);
  display: block;
  transition: 0.2s ease-in-out;
}

.dropdown-content a:hover {
  background-color: transparent;
  color: var(--identidade);
}

.menu-dropdown:hover .dropdown-content {
  display: flex;
  flex-direction: column;
}

.notification-popup {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 15px 25px;
  border-radius: 4px;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  transform: translateX(10px);
  transition: all 0.5s ease-in-out;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 10px;
}

.notification-popup.success {
  background-color: rgb(86, 214, 86);
}

.notification-popup.error {
  background-color: #dc3545;
}

.notification-popup.attention {
  background-color: #ffc107;
  color: #000;
}

.notification-popup.show {
  opacity: 1;
  transform: translateX(0);
}

.notification-popup i {
  font-size: 20px;
}

/* User actions desktop */
.user-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-right: 10px;
  gap: 10px;
  height: 100%;
}

.settings-icon {
  border: none;
  padding: 2.5px 15px;
  color: var(--cor-secundaria);
  background-color: var(--identidade);
  cursor: pointer;
  border-radius: 5px;
  font-size: 14px;
  transition: 0.3s ease-in-out;
}

.settings-icon i,
.notif-btn i {
  color: var(--cor-secundaria);
}

.settings-icon:hover {
  background-color: var(--hoverbtn);
}

.lgn-btn {
  border: none;
  border-radius: 3px;
  background-color: var(--identidade);
  padding: 3px 15px;
  color: var(--cor-secundaria);
  cursor: pointer;
  transition: 0.3s ease-in-out;
}

.lgn-btn i {
  color: var(--cor-secundaria);
  margin-left: 8px;
}

.lgn-btn:hover {
  background-color: var(--hoverbtn);
}

/* Botão Menu Hamburguer */
.menu-btn {
  display: none;
  background: none;
  border: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  z-index: 1100;
  grid-column: 3;
  justify-self: flex-end;
  margin-right: 20px;
}

.menu-btn span {
  width: 25px;
  height: 3px;
  background-color: var(--cor-primaria);
  margin: 3px 0;
  border-radius: 2px;
  transition: all 0.3s ease-in-out;
  transform-origin: center;
}

.menu-btn.active span:nth-child(1) {
  transform: rotate(45deg) translate(4px, 8px);
}

.menu-btn.active span:nth-child(2) {
  opacity: 0;
}

.menu-btn.active span:nth-child(3) {
  transform: rotate(-45deg) translate(4px, -8px);
}

.mobile-nav {
  position: fixed;
  top: 0;
  right: 0;
  width: 180px;
  height: 100vh;
  background-color: var(--cor-secundaria);
  box-shadow: -4px 0 8px rgba(0, 0, 0, 0.2);
  padding: 60px 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  transform: translateX(100%);
  transition: 0.3s ease-in-out;
  z-index: 1050;
  overflow-y: auto;
}

.mobile-nav.open {
  transform: translateX(0);
}

.mobile-nav a {
  text-decoration: none;
  color: var(--cor-primaria);
  font-size: 18px;
  padding: 10px 0;
  border-bottom: 1px solid var(--cor-primaria);
  display: block;
  text-decoration-skip-ink: none;
}

.mobile-nav summary {
  color: var(--identidade);
  font-weight: bold;
  font-size: 16px;
  padding: 8px 0;
  cursor: pointer;
  list-style: none;
  border-bottom: 1px solid var(--identidade);
}

.mobile-nav summary::-webkit-details-marker {
  display: none;
}

.mobile-nav-section a,
.mobile-user-actions a {
  color: var(--cor-textos-alt);
  border-bottom: none;
  display: flex;
}

.mobile-user-actions button{
  width: 100px;
}

.mobile-user-actions {
  display: flex;
  gap: 20px;
  flex-direction: column;
}

.mobile-nav details {
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
  max-height: 40px;
}

.mobile-nav details[open] {
  max-height: 500px;
  padding-bottom: 10px;
}

.mobile-nav details summary {
  transition: color 0.3s ease;
}

.mobile-nav details summary:hover {
  color: var(--hoverbtn);
}

.notif-btn {
  border: none;
  border-radius: 3px;
  background-color: var(--identidade);
  padding: 3px 15px;
  color: var(--cor-secundaria);
  cursor: pointer;
  transition: 0.3s ease-in-out;
  position: relative;
}

.notif-btn:hover {
  background: var(--hoverbtn);
}

#notif-badge {
  position: absolute;
  top: 20px;
  right: 10px;
  background: #e53935;
  color: #fff;
  font-size: 10px;
  font-weight: bold;
  border-radius: 90%;
  padding: 2px 2px;
  min-width: 18px;
  text-align: center;
  display: inline-block;
  z-index: 9000;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.13);
  pointer-events: none;
}

.notif-dropdown {
  position: absolute;
  top: 38px;
  right: 0;
  width: 340px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.13);
  z-index: 2000;
  min-height: 40px;
  max-height: 380px;
  overflow-y: auto;
  border: 1px solid var(--cor-terciaria);
}

.notif-dropdown-content {
  padding: 0;
  margin: 0;
}

.notif-item {
  padding: 14px 18px 10px 18px;
  border-bottom: 1px solid #f0f0f0;
  font-size: 1rem;
  color: var(--cor-textos-alt);
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: #fff;
  transition: background 0.2s;
}

/* Notificação não visualizada */
.notif-item.notif-unseen {
  background: #f7f9ff;
  border-left: 4px solid #3b82f6;
  font-weight: 600;
}

.notif-item:last-child {
  border-bottom: none;
}

.notif-actions {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}

.notif-accept,
.notif-reject {
  border: none;
  border-radius: 5px;
  padding: 4px 12px;
  font-size: 0.97rem;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.2s;
}

.notif-accept {
  background: #43a047;
  color: #fff;
}

.notif-accept:disabled {
  background: #b2dfdb;
  color: #fff;
  cursor: default;
}

.notif-reject {
  background: #e53935;
  color: #fff;
}

.notif-reject:disabled {
  background: #ffcdd2;
  color: #fff;
  cursor: default;
}

.notif-status {
  font-size: 0.95rem;
  font-weight: 500;
  margin-top: 2px;
}

.notif-delete-all-container {
  width: 100%;
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.notif-delete-all-btn {
  background: #e53935;
  color: #fff;
  border: none;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.89rem;
  min-width: 0;
}

@media (max-width: 768px) {
  .menu-btn {
    display: flex;
  }

  .menu-group,
  .user-actions {
    display: none;
  }

  #notif-dropdown {
    left: 0;
    right: 0;
    min-width: 0;
    width: 100%;
    margin: 0 auto;
    top: 110%;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  }
}