/* ─── Panel de Notificaciones In-App — Lintrack v2.0 ─────────────────────── */

/* Botón campana en el header */
#btn-notif {
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  color: var(--text-muted, #888);
  transition: color 0.2s, background 0.2s;
  font-size: 1.2rem;
  line-height: 1;
}

#btn-notif:hover {
  color: var(--text, #fff);
  background: var(--surface2, rgba(255,255,255,0.08));
}

/* Badge con contador */
#notif-badge {
  display: none;
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 3px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  line-height: 1;
  pointer-events: none;
}

/* Panel lateral / dropdown */
#notif-panel {
  position: fixed;
  top: 56px;
  right: 12px;
  width: 340px;
  max-width: calc(100vw - 24px);
  max-height: 480px;
  background: var(--surface, #1e1e2e);
  border: 1px solid var(--border, rgba(255,255,255,0.1));
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  z-index: 900;
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

#notif-panel.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* Header del panel */
.notif-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border, rgba(255,255,255,0.08));
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text, #fff);
}

.notif-panel-header button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.75rem;
  color: var(--text-muted, #888);
  padding: 2px 6px;
  border-radius: 4px;
}

.notif-panel-header button:hover {
  color: var(--text, #fff);
  background: var(--surface2, rgba(255,255,255,0.08));
}

/* Lista scrollable */
#notif-panel-list {
  overflow-y: auto;
  flex: 1;
}

/* Item individual */
.notif-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border, rgba(255,255,255,0.06));
  cursor: default;
  transition: background 0.15s;
}

.notif-item:hover {
  background: var(--surface2, rgba(255,255,255,0.04));
}

.notif-item.notif-leida {
  opacity: 0.6;
}

/* Urgencia — indicador de color lateral */
.notif-item.notif-atencion {
  border-left: 3px solid #f59e0b;
}

.notif-item.notif-critico {
  border-left: 3px solid #ef4444;
}

.notif-item.notif-info {
  border-left: 3px solid #6366f1;
}

/* Header del item */
.notif-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.notif-icon {
  font-size: 0.85rem;
  flex-shrink: 0;
}

.notif-titulo {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text, #fff);
  flex: 1;
}

.notif-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted, #888);
  font-size: 1rem;
  line-height: 1;
  padding: 0 2px;
  border-radius: 4px;
  flex-shrink: 0;
}

.notif-close:hover {
  color: var(--text, #fff);
  background: var(--surface2, rgba(255,255,255,0.08));
}

/* Mensaje */
.notif-mensaje {
  margin: 0 0 4px;
  font-size: 0.78rem;
  color: var(--text-muted, #aaa);
  line-height: 1.4;
}

/* Fecha relativa */
.notif-fecha {
  font-size: 0.7rem;
  color: var(--text-muted, #666);
}

/* Estado vacío */
.notif-empty {
  padding: 32px 16px;
  text-align: center;
  color: var(--text-muted, #888);
  font-size: 0.85rem;
}

/* Móvil */
@media (max-width: 480px) {
  #notif-panel {
    right: 0;
    top: 56px;
    width: 100vw;
    border-radius: 0 0 12px 12px;
  }
}
