/* Notificações - Ícone na barra superior */
.pc-notification-bell {
  background: none;
  border: none;
  color: #ffffff;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 8px;
  transition: background-color 0.2s, color 0.2s;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: inherit;
}

.pc-notification-bell svg {
  color: #ffffff !important;
  fill: #ffffff !important;
  stroke: #ffffff !important;
}

.pc-notification-bell:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.pc-notification-bell:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.3);
  outline-offset: 2px;
}

.pc-notification-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ef4444;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
  line-height: 1;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Modal de notificações usando estrutura do index */
.notifications-panel-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.42);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  z-index: 1790;
  display: none;
}

.notifications-panel-overlay.active {
  display: block;
}

.notifications-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(92vw, 480px);
  max-height: min(78vh, 640px);
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  box-shadow: 0 16px 46px rgba(0, 0, 0, 0.22);
  z-index: 1800;
  display: none;
  overflow: hidden;
  flex-direction: column;
}

.notifications-panel.active {
  display: flex;
}

.notifications-panel-header {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f9fafb;
}

.notifications-panel-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #102a43;
}

.notifications-panel-close {
  background: none;
  border: none;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  color: #6b7280;
  display: none;
}

.notifications-panel.active .notifications-panel-close {
  display: block;
}

.notifications-panel-list {
  flex: 1;
  overflow-y: auto;
  padding: 6px 0;
}

.notification-item {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  cursor: pointer;
  transition: background-color 0.2s;
}

.notification-item:hover {
  background-color: rgba(79, 70, 229, 0.04);
}

.notification-item.unread,
.notification-item.not-read {
  background-color: rgba(79, 70, 229, 0.07);
}

.notification-item-header {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.notification-icon {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.notification-content {
  flex: 1;
  min-width: 0;
}

.notification-title {
  margin: 0 0 4px;
  font-size: 0.92rem;
  color: #102a43;
}

.notification-unread-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: 8px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  background: rgba(79, 70, 229, 0.12);
  color: #4338ca;
  vertical-align: middle;
}

.notification-unread-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4338ca;
  flex: 0 0 6px;
}

.notification-message {
  margin: 0 0 4px;
  color: #486581;
  font-size: 0.84rem;
  line-height: 1.4;
}

.notification-time {
  margin: 0;
  color: #9ca3af;
  font-size: 0.74rem;
}

.notifications-empty {
  padding: 28px 16px;
  text-align: center;
  color: #9ca3af;
}

/* Modal de detalhe da notificação */
.notification-detail-modal {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.5);
  z-index: 1810;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.notification-detail-modal.active {
  display: flex;
}

.notification-detail-dialog {
  width: min(92vw, 520px);
  max-height: min(84vh, 720px);
  overflow: auto;
  background: #fff;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.25);
}

.notification-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.notification-detail-title {
  margin: 0;
  color: #102a43;
  font-size: 1rem;
  font-weight: 700;
}

.notification-detail-close {
  border: none;
  background: transparent;
  font-size: 1.4rem;
  color: #6b7280;
  cursor: pointer;
  line-height: 1;
}

.notification-detail-body {
  padding: 16px;
  display: grid;
  gap: 12px;
}

.notification-detail-field {
  display: grid;
  gap: 6px;
}

.notification-detail-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.notification-detail-message {
  margin: 0;
  color: #334e68;
  line-height: 1.55;
  white-space: pre-wrap;
}

.notification-detail-time {
  margin: 0;
  color: #9ca3af;
  font-size: 0.82rem;
}

.notification-detail-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 40px;
  padding: 0.55rem 0.95rem;
  border-radius: 9px;
  text-decoration: none;
  background: #4f46e5;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
}

.notification-detail-link:hover {
  background: #4338ca;
}

@media (max-width: 640px) {
  .notifications-panel {
    width: 100vw;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
  }
}

/* Modal/Dropdown de Notificações */
.pc-notifications-modal {
  position: fixed;
  top: 60px;
  right: 16px;
  width: 360px;
  max-width: calc(100vw - 32px);
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  z-index: 2000;
  display: none;
  flex-direction: column;
  max-height: 500px;
  overflow: hidden;
}

.pc-notifications-modal.show {
  display: flex;
}

.pc-notifications-header {
  padding: 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pc-notifications-header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #102a43;
}

.pc-notifications-clear {
  background: none;
  border: none;
  color: #486581;
  cursor: pointer;
  font-size: 0.9rem;
  text-decoration: none;
  padding: 0;
  transition: color 0.2s;
}

.pc-notifications-clear:hover {
  color: #102a43;
}

.pc-notifications-list {
  flex: 1;
  overflow-y: auto;
  list-style: none;
  margin: 0;
  padding: 0;
}

.pc-notification-item {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  cursor: pointer;
  transition: background-color 0.2s;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.pc-notification-item:hover {
  background-color: rgba(79, 70, 229, 0.04);
}

.pc-notification-item.not-read {
  background-color: rgba(79, 70, 229, 0.06);
}

.pc-notification-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.pc-notification-item[data-tipo="info"] .pc-notification-icon {
  background-color: rgba(59, 130, 246, 0.1);
}

.pc-notification-item[data-tipo="sucesso"] .pc-notification-icon {
  background-color: rgba(34, 197, 94, 0.1);
}

.pc-notification-item[data-tipo="aviso"] .pc-notification-icon {
  background-color: rgba(245, 158, 11, 0.1);
}

.pc-notification-item[data-tipo="erro"] .pc-notification-icon {
  background-color: rgba(239, 68, 68, 0.1);
}

.pc-notification-content {
  flex: 1;
  min-width: 0;
}

.pc-notification-title {
  font-weight: 700;
  color: #102a43;
  margin: 0 0 4px 0;
  font-size: 0.9rem;
}

.pc-notification-text {
  color: #486581;
  font-size: 0.85rem;
  margin: 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pc-notification-time {
  color: #a1afc9;
  font-size: 0.75rem;
  margin-top: 4px;
}

.pc-notifications-empty {
  padding: 32px 16px;
  text-align: center;
  color: #a1afc9;
}

.pc-notifications-footer {
  padding: 12px 16px;
  text-align: center;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.pc-notifications-footer a {
  color: #4f46e5;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}

.pc-notifications-footer a:hover {
  text-decoration: underline;
}

@media (max-width: 480px) {
  .pc-notifications-modal {
    width: 100vw;
    height: 100vh;
    max-height: 100vh;
    right: 0;
    top: 0;
    border-radius: 0;
  }

  .pc-notifications-header {
    padding: 20px 16px;
    border-bottom: none;
  }

  .pc-notifications-list {
    overflow-y: auto;
  }
}
